#[inline] for the AsRef implementation.
This may be redundant since the function is generic and generic functions are, in the current Rust compiler, always inlinable, but it follows the general recommended practice of making trivial accessor functions inlinable.
This commit is contained in:
parent
cfbde6073c
commit
3529b2054b
1 changed files with 1 additions and 0 deletions
|
|
@ -111,6 +111,7 @@ impl<W: HasRawWindowHandle> GraphicsContext<W> {
|
|||
|
||||
impl<W: HasRawWindowHandle> AsRef<W> for GraphicsContext<W> {
|
||||
/// Equivalent to [`self.window()`](Self::window()).
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &W {
|
||||
self.window()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue