diff --git a/rust/pin-init/examples/error.rs b/rust/pin-init/examples/error.rs index 8f4e135eb8ba..96f095398e8d 100644 --- a/rust/pin-init/examples/error.rs +++ b/rust/pin-init/examples/error.rs @@ -11,6 +11,7 @@ pub struct Error; impl From for Error { + #[inline] fn from(e: Infallible) -> Self { match e {} } @@ -18,6 +19,7 @@ fn from(e: Infallible) -> Self { #[cfg(feature = "alloc")] impl From for Error { + #[inline] fn from(_: AllocError) -> Self { Self }