use crate::Context;
use crate::Kind;
use crate::Status;
pub trait ResultStatusExt<C, F>
where
C: Context,
F: Fn(C) -> C,
{
fn context_with(self, replacements: F) -> Self;
}
impl<T, K, C, F> ResultStatusExt<C, F> for Result<T, Status<K, C>>
where
K: Kind,
C: Context,
F: Fn(C) -> C,
{
fn context_with(self, replacements: F) -> Self {
self.map_err(|e| e.context_with(replacements))
}
}