From 3529b2054b798d93ced7c425b7ead4bfc0d8fffb Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Tue, 23 Aug 2022 19:00:00 -0700 Subject: [PATCH] `#[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. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 081f7a0..b64eeee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,6 +111,7 @@ impl GraphicsContext { impl AsRef for GraphicsContext { /// Equivalent to [`self.window()`](Self::window()). + #[inline] fn as_ref(&self) -> &W { self.window() }