#[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:
Kevin Reid 2022-08-23 19:00:00 -07:00
parent cfbde6073c
commit 3529b2054b

View file

@ -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()
}