Skip to content

Commit 24a62e1

Browse files
committed
Tweak error reporting in io::net::tcp tests
Errors can be printed with {}, printing with {:?} does not work very well. Not actually related to this PR, but it came up when running the tests and now is as good a time to fix it as any.
1 parent 4b74dc1 commit 24a62e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/io/net/tcp.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ mod test {
623623
Ok(..) => fail!(),
624624
Err(ref e) => {
625625
assert!(e.kind == NotConnected || e.kind == EndOfFile,
626-
"unknown kind: {:?}", e.kind);
626+
"unknown kind: {}", e.kind);
627627
}
628628
}
629629
})
@@ -648,7 +648,7 @@ mod test {
648648
Ok(..) => fail!(),
649649
Err(ref e) => {
650650
assert!(e.kind == NotConnected || e.kind == EndOfFile,
651-
"unknown kind: {:?}", e.kind);
651+
"unknown kind: {}", e.kind);
652652
}
653653
}
654654
})
@@ -673,7 +673,7 @@ mod test {
673673
assert!(e.kind == ConnectionReset ||
674674
e.kind == BrokenPipe ||
675675
e.kind == ConnectionAborted,
676-
"unknown error: {:?}", e);
676+
"unknown error: {}", e);
677677
break;
678678
}
679679
}
@@ -700,7 +700,7 @@ mod test {
700700
assert!(e.kind == ConnectionReset ||
701701
e.kind == BrokenPipe ||
702702
e.kind == ConnectionAborted,
703-
"unknown error: {:?}", e);
703+
"unknown error: {}", e);
704704
break;
705705
}
706706
}

0 commit comments

Comments
 (0)