Avoid Error fmt

Rust change https://github.com/rust-lang/rust/pull/60897 changed the output, making this test fail on nightly
This commit is contained in:
Thom Wiggers 2019-06-11 13:31:10 +02:00 committed by ctz
parent b66d27faae
commit 2e920f3df0
1 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::mem;
use std::fmt;
use std::env;
use std::error::Error;
use std::io::{self, Write, Read};
use rustls;
@ -946,8 +947,9 @@ fn stream_write_reports_underlying_io_error_before_plaintext_processed() {
let mut client_stream = Stream::new(&mut client, &mut pipe);
let rc = client_stream.write(b"world");
assert!(rc.is_err());
assert_eq!(format!("{:?}", rc),
"Err(Custom { kind: WouldBlock, error: StringError(\"oops\") })");
let err = rc.err().unwrap();
assert_eq!(err.kind(), io::ErrorKind::WouldBlock);
assert_eq!(err.description(), "oops");
}
#[test]