test: Update API methods which are deprecated in image crate
This commit is contained in:
parent
6f0eac5a8c
commit
82e158fcce
|
@ -325,7 +325,7 @@ mod image_tests {
|
|||
fn test_annex_i_qr_as_image() {
|
||||
let code = QrCode::new(b"01234567").unwrap();
|
||||
let image = code.render::<Luma<u8>>().build();
|
||||
let expected = load_from_memory(include_bytes!("test_annex_i_qr_as_image.png")).unwrap().to_luma();
|
||||
let expected = load_from_memory(include_bytes!("test_annex_i_qr_as_image.png")).unwrap().to_luma8();
|
||||
assert_eq!(image.dimensions(), expected.dimensions());
|
||||
assert_eq!(image.into_raw(), expected.into_raw());
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ mod image_tests {
|
|||
.dark_color(Rgb([128, 0, 0]))
|
||||
.light_color(Rgb([255, 255, 128]))
|
||||
.build();
|
||||
let expected = load_from_memory(include_bytes!("test_annex_i_micro_qr_as_image.png")).unwrap().to_rgb();
|
||||
let expected = load_from_memory(include_bytes!("test_annex_i_micro_qr_as_image.png")).unwrap().to_rgb8();
|
||||
assert_eq!(image.dimensions(), expected.dimensions());
|
||||
assert_eq!(image.into_raw(), expected.into_raw());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue