feat: std error compatible error
This commit is contained in:
@ -16,15 +16,15 @@
|
||||
|
||||
extern crate magick_rust;
|
||||
|
||||
use magick_rust::{bindings, magick_wand_genesis, MagickWand, PixelWand, ResourceType};
|
||||
|
||||
use magick_rust::ToMagick;
|
||||
use std::error::Error;
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
use std::sync::Once;
|
||||
|
||||
use magick_rust::{MagickError, ToMagick};
|
||||
use magick_rust::{bindings, magick_wand_genesis, MagickWand, PixelWand, ResourceType};
|
||||
|
||||
// Used to make sure MagickWand is initialized exactly once. Note that we
|
||||
// do not bother shutting down, we simply exit when the tests are done.
|
||||
static START: Once = Once::new();
|
||||
@ -81,7 +81,6 @@ fn test_thumbnail_image() {
|
||||
assert_eq!(192, wand.get_image_height());
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_read_from_blob() {
|
||||
START.call_once(|| {
|
||||
@ -172,7 +171,7 @@ fn test_get_image_property() {
|
||||
// retrieve a property that does not exist
|
||||
let missing_value = wand.get_image_property("exif:Foobar");
|
||||
assert!(missing_value.is_err());
|
||||
assert_eq!("missing property", missing_value.unwrap_err());
|
||||
assert_eq!(MagickError("missing property"), missing_value.unwrap_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user