feat: add inline to context and map_context methods

This commit is contained in:
Harald Hoyer 2021-02-02 15:35:50 +01:00 committed by Harald Hoyer
parent 4eae3da3c1
commit bdfec08228
Signed by: harald
GPG key ID: 900F3C4971086004

View file

@ -339,6 +339,7 @@ impl<O, E: Into<Box<dyn Error + 'static + Send + Sync>>> ResultTrait<O, E>
for std::result::Result<O, E> for std::result::Result<O, E>
{ {
#[track_caller] #[track_caller]
#[inline]
fn context<T: 'static + Display + Debug>( fn context<T: 'static + Display + Debug>(
self, self,
kind: T, kind: T,
@ -354,6 +355,7 @@ impl<O, E: Into<Box<dyn Error + 'static + Send + Sync>>> ResultTrait<O, E>
} }
#[track_caller] #[track_caller]
#[inline]
fn map_context<T: 'static + Display + Debug, F: FnOnce(&E) -> T>( fn map_context<T: 'static + Display + Debug, F: FnOnce(&E) -> T>(
self, self,
op: F, op: F,