diff --git a/src/core/utils/result.rs b/src/core/utils/result.rs index 675e2ffa..62a13cb3 100644 --- a/src/core/utils/result.rs +++ b/src/core/utils/result.rs @@ -2,6 +2,7 @@ mod and_then_ref; mod debug_inspect; mod filter; mod flat_ok; +mod inspect_log; mod into_is_ok; mod log_debug_err; mod log_err; @@ -12,9 +13,18 @@ mod unwrap_infallible; mod unwrap_or_err; pub use self::{ - and_then_ref::AndThenRef, debug_inspect::DebugInspect, filter::Filter, flat_ok::FlatOk, - into_is_ok::IntoIsOk, log_debug_err::LogDebugErr, log_err::LogErr, map_expect::MapExpect, - map_ref::MapRef, not_found::NotFound, unwrap_infallible::UnwrapInfallible, + and_then_ref::AndThenRef, + debug_inspect::DebugInspect, + filter::Filter, + flat_ok::FlatOk, + inspect_log::{ErrDebugLog, ErrLog}, + into_is_ok::IntoIsOk, + log_debug_err::LogDebugErr, + log_err::LogErr, + map_expect::MapExpect, + map_ref::MapRef, + not_found::NotFound, + unwrap_infallible::UnwrapInfallible, unwrap_or_err::UnwrapOrErr, }; diff --git a/src/core/utils/result/inspect_log.rs b/src/core/utils/result/inspect_log.rs index e9f32663..1926a4d2 100644 --- a/src/core/utils/result/inspect_log.rs +++ b/src/core/utils/result/inspect_log.rs @@ -9,9 +9,11 @@ pub trait ErrLog where E: fmt::Display, { + #[must_use] fn log_err(self, level: Level) -> Self; #[inline] + #[must_use] fn err_log(self) -> Self where Self: Sized, @@ -24,9 +26,11 @@ pub trait ErrDebugLog where E: fmt::Debug, { + #[must_use] fn log_err_debug(self, level: Level) -> Self; #[inline] + #[must_use] fn err_debug_log(self) -> Self where Self: Sized,