From 82e158fcce3b41f7eaf3dd2174e56a7a44e823cb Mon Sep 17 00:00:00 2001 From: Shane Snover Date: Mon, 19 Apr 2021 19:24:24 -0600 Subject: [PATCH] test: Update API methods which are deprecated in image crate --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b748659..bef057f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::>().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()); }