test: fix compiler warning about dyn Error
This commit is contained in:
@ -91,12 +91,12 @@ fn test_read_from_blob() {
|
|||||||
|
|
||||||
let path = Path::new("tests/data/IMG_5745.JPG");
|
let path = Path::new("tests/data/IMG_5745.JPG");
|
||||||
let mut file = match File::open(&path) {
|
let mut file = match File::open(&path) {
|
||||||
Err(why) => panic!("couldn't open file: {}", Error::to_string(&why)),
|
Err(why) => panic!("couldn't open file: {}", <dyn Error>::to_string(&why)),
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
};
|
};
|
||||||
let mut data: Vec<u8> = Vec::new();
|
let mut data: Vec<u8> = Vec::new();
|
||||||
match file.read_to_end(&mut data) {
|
match file.read_to_end(&mut data) {
|
||||||
Err(why) => panic!("couldn't read file: {}", Error::to_string(&why)),
|
Err(why) => panic!("couldn't read file: {}", <dyn Error>::to_string(&why)),
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
};
|
};
|
||||||
assert!(wand.read_image_blob(&data).is_ok());
|
assert!(wand.read_image_blob(&data).is_ok());
|
||||||
|
|||||||
Reference in New Issue
Block a user