diff --git a/vulkano/src/lib.rs b/vulkano/src/lib.rs index a9e24eb3..601d4296 100644 --- a/vulkano/src/lib.rs +++ b/vulkano/src/lib.rs @@ -389,6 +389,7 @@ pub enum Validated { impl Validated { /// Maps the inner `Error` value using the provided function, or does nothing if the value is /// `ValidationError`. + #[inline] pub fn map(self, f: impl FnOnce(E) -> F) -> Validated { match self { Self::Error(err) => Validated::Error(f(err)), @@ -396,6 +397,7 @@ impl Validated { } } + #[inline] fn map_validation(self, f: impl FnOnce(Box) -> Box) -> Self { match self { Self::Error(err) => Self::Error(err), @@ -404,6 +406,8 @@ impl Validated { } /// Returns the inner `Error` value, or panics if it contains `ValidationError`. + #[inline(always)] + #[track_caller] pub fn unwrap(self) -> E { match self { Self::Error(err) => err,