Skip to content

Commit

Permalink
Tweak error reporting in io::net::tcp tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lilyball committed Jul 31, 2014
1 parent 4b74dc1 commit 24a62e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstd/io/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ mod test {
Ok(..) => fail!(),
Err(ref e) => {
assert!(e.kind == NotConnected || e.kind == EndOfFile,
"unknown kind: {:?}", e.kind);
"unknown kind: {}", e.kind);
}
}
})
Expand All @@ -648,7 +648,7 @@ mod test {
Ok(..) => fail!(),
Err(ref e) => {
assert!(e.kind == NotConnected || e.kind == EndOfFile,
"unknown kind: {:?}", e.kind);
"unknown kind: {}", e.kind);
}
}
})
Expand All @@ -673,7 +673,7 @@ mod test {
assert!(e.kind == ConnectionReset ||
e.kind == BrokenPipe ||
e.kind == ConnectionAborted,
"unknown error: {:?}", e);
"unknown error: {}", e);
break;
}
}
Expand All @@ -700,7 +700,7 @@ mod test {
assert!(e.kind == ConnectionReset ||
e.kind == BrokenPipe ||
e.kind == ConnectionAborted,
"unknown error: {:?}", e);
"unknown error: {}", e);
break;
}
}
Expand Down

0 comments on commit 24a62e1

Please sign in to comment.