use fmt::Result where applicable

This commit is contained in:
Andre Bogus 2018-05-09 01:41:44 +02:00
parent 8ff4b42064
commit e333725664
13 changed files with 20 additions and 20 deletions

View file

@ -15,7 +15,7 @@ use std::{env, fmt, process, sync, thread};
struct SlowFmt(u32);
impl fmt::Debug for SlowFmt {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
thread::sleep_ms(3);
self.0.fmt(f)
}

View file

@ -15,7 +15,7 @@ union U {
}
impl fmt::Display for U {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
unsafe { write!(f, "Oh hai {}", self.a) }
}
}