mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-31 00:56:41 +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>
|
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,
|
||||||
|
|
Loading…
Reference in a new issue