Skip to content

Commit

Permalink
Avoid Error fmt
Browse files Browse the repository at this point in the history
Rust change rust-lang/rust#60897 changed the output, making this test fail on nightly
  • Loading branch information
thomwiggers committed Jun 11, 2019
1 parent f535d64 commit a71e959
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/api.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit a71e959

Please sign in to comment.