about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2018-05-12 07:32:27 -0600
committerGitHub <noreply@github.com>2018-05-12 07:32:27 -0600
commitd7f5e1f5d1677d90fa7f0b475e20d8679b6250a3 (patch)
tree1441a1db6c290c8eb09bab54ad0555dae92e3068 /src/libstd/sys_common
parent3603d241d8cfa3a323375171e0a5fc9118764f0b (diff)
parente333725664c45874262ecb11e511c17cfd4672f0 (diff)
downloadrust-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.rs4
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)
     }
 }