use fmt::Result where applicable
This commit is contained in:
parent
8ff4b42064
commit
e333725664
13 changed files with 20 additions and 20 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue