diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-05-12 07:32:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-12 07:32:27 -0600 |
| commit | d7f5e1f5d1677d90fa7f0b475e20d8679b6250a3 (patch) | |
| tree | 1441a1db6c290c8eb09bab54ad0555dae92e3068 /src/libstd/sys_common | |
| parent | 3603d241d8cfa3a323375171e0a5fc9118764f0b (diff) | |
| parent | e333725664c45874262ecb11e511c17cfd4672f0 (diff) | |
| download | rust-d7f5e1f5d1677d90fa7f0b475e20d8679b6250a3.tar.gz rust-d7f5e1f5d1677d90fa7f0b475e20d8679b6250a3.zip | |
Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkov
use fmt::Result where applicable This is a quite boring PR, but I think the type alias improves readability, so why not use it?
Diffstat (limited to 'src/libstd/sys_common')
| -rw-r--r-- | src/libstd/sys_common/wtf8.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs index fe7e058091e..14a2555adf9 100644 --- a/src/libstd/sys_common/wtf8.rs +++ b/src/libstd/sys_common/wtf8.rs @@ -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) } } |
