Cleanup xwrap implementation

This commit is contained in:
topjohnwu
2025-04-14 18:13:26 -07:00
committed by John Wu
parent 7bd901273c
commit f063fa5054
5 changed files with 185 additions and 333 deletions

View File

@@ -61,7 +61,6 @@ pub trait ResultExt<T> {
// Internal C++ bridging logging routines
pub(crate) trait CxxResultExt<T> {
fn log_cxx(self) -> LoggedResult<T>;
fn log_cxx_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T>;
}
trait Loggable<T> {
@@ -78,10 +77,6 @@ impl<T, R: Loggable<T>> CxxResultExt<T> for R {
fn log_cxx(self) -> LoggedResult<T> {
self.do_log(LogLevel::ErrorCxx, None)
}
fn log_cxx_with_msg<F: FnOnce(Formatter) -> fmt::Result>(self, f: F) -> LoggedResult<T> {
self.do_log_msg(LogLevel::ErrorCxx, None, f)
}
}
impl<T, R: Loggable<T>> ResultExt<T> for R {