mirror of
https://gitee.com/openharmony/third_party_rust_log
synced 2024-11-23 07:40:08 +00:00
Merge pull request #398 from dtolnay/ra_hir_def
Resolve possible inference disruption by removing unneeded From impl
This commit is contained in:
commit
c5c8e48f35
@ -41,12 +41,6 @@ impl From<fmt::Error> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for fmt::Error {
|
||||
fn from(_: Error) -> Self {
|
||||
fmt::Error
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
mod std_support {
|
||||
use super::*;
|
||||
|
@ -65,7 +65,7 @@ pub(in kv::value) use self::fmt::{Arguments, Debug, Display};
|
||||
|
||||
impl<'v> fmt::Debug for kv::Value<'v> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.visit(&mut FmtVisitor(f))?;
|
||||
self.visit(&mut FmtVisitor(f)).map_err(|_| fmt::Error)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -73,7 +73,7 @@ impl<'v> fmt::Debug for kv::Value<'v> {
|
||||
|
||||
impl<'v> fmt::Display for kv::Value<'v> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.visit(&mut FmtVisitor(f))?;
|
||||
self.visit(&mut FmtVisitor(f)).map_err(|_| fmt::Error)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -747,7 +747,7 @@ struct KeyValues<'a>(&'a dyn kv::Source);
|
||||
impl<'a> fmt::Debug for KeyValues<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut visitor = f.debug_map();
|
||||
self.0.visit(&mut visitor)?;
|
||||
self.0.visit(&mut visitor).map_err(|_| fmt::Error)?;
|
||||
visitor.finish()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user