use fmt::Result where applicable
This commit is contained in:
@@ -1460,7 +1460,7 @@ impl<P: AsRef<Path>> iter::Extend<P> for PathBuf {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl fmt::Debug for PathBuf {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Debug::fmt(&**self, formatter)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,13 +48,13 @@ impl Error {
|
||||
}
|
||||
|
||||
impl fmt::Debug for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.write_str(self.text())
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.write_str(self.text())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ pub struct CodePoint {
|
||||
/// Example: `U+1F4A9`
|
||||
impl fmt::Debug for CodePoint {
|
||||
#[inline]
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(formatter, "U+{:04X}", self.value)
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ impl ops::DerefMut for Wtf8Buf {
|
||||
/// Example: `"a\u{D800}"` for a string with code points [U+0061, U+D800]
|
||||
impl fmt::Debug for Wtf8Buf {
|
||||
#[inline]
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Debug::fmt(&**self, formatter)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user