1
Fork 0

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.
This commit is contained in:
Kevin Ballard 2014-07-03 21:36:51 -07:00
parent 4b74dc167c
commit 24a62e176a

View file

@ -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);
}
}
})
@ -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);
}
}
})
@ -673,7 +673,7 @@ mod test {
assert!(e.kind == ConnectionReset ||
e.kind == BrokenPipe ||
e.kind == ConnectionAborted,
"unknown error: {:?}", e);
"unknown error: {}", e);
break;
}
}
@ -700,7 +700,7 @@ mod test {
assert!(e.kind == ConnectionReset ||
e.kind == BrokenPipe ||
e.kind == ConnectionAborted,
"unknown error: {:?}", e);
"unknown error: {}", e);
break;
}
}