Skip to content

Commit 3529b20

Browse files
committed
#[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.
1 parent cfbde60 commit 3529b20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl<W: HasRawWindowHandle> GraphicsContext<W> {
111111

112112
impl<W: HasRawWindowHandle> AsRef<W> for GraphicsContext<W> {
113113
/// Equivalent to [`self.window()`](Self::window()).
114+
#[inline]
114115
fn as_ref(&self) -> &W {
115116
self.window()
116117
}

0 commit comments

Comments
 (0)