mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-25 08:31:23 +00:00
Fix LoggedResult implementation error
This commit is contained in:
@@ -153,16 +153,14 @@ impl<T> ResultExt<T> for LoggedResult<T> {
|
|||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
fn log_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T> {
|
fn log_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T> {
|
||||||
do_log_msg(LogLevel::Error, None, f);
|
self.inspect_err(|_| do_log_msg(LogLevel::Error, None, f))
|
||||||
self
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
fn log_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T> {
|
fn log_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T> {
|
||||||
let caller = Some(Location::caller());
|
let caller = Some(Location::caller());
|
||||||
do_log_msg(LogLevel::Error, caller, f);
|
self.inspect_err(|_| do_log_msg(LogLevel::Error, caller, f))
|
||||||
self
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn log_ok(self) {}
|
fn log_ok(self) {}
|
||||||
|
Reference in New Issue
Block a user