mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-30 16:46:42 +01:00
feat: add inline to context and map_context methods
This commit is contained in:
parent
4eae3da3c1
commit
bdfec08228
|
@ -339,6 +339,7 @@ impl<O, E: Into<Box<dyn Error + 'static + Send + Sync>>> ResultTrait<O, E>
|
|||
for std::result::Result<O, E>
|
||||
{
|
||||
#[track_caller]
|
||||
#[inline]
|
||||
fn context<T: 'static + Display + Debug>(
|
||||
self,
|
||||
kind: T,
|
||||
|
@ -354,6 +355,7 @@ impl<O, E: Into<Box<dyn Error + 'static + Send + Sync>>> ResultTrait<O, E>
|
|||
}
|
||||
|
||||
#[track_caller]
|
||||
#[inline]
|
||||
fn map_context<T: 'static + Display + Debug, F: FnOnce(&E) -> T>(
|
||||
self,
|
||||
op: F,
|
||||
|
|
Loading…
Reference in a new issue