Skip to content

Commit 3004d3d

Browse files
committed
Fix the compiler warning when compile on WASM
1 parent 8efcfb0 commit 3004d3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/element/image.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ use image::{DynamicImage, GenericImageView};
33

44
use super::{Drawable, PointCollection};
55
use plotters_backend::{BackendCoord, DrawingBackend, DrawingErrorKind};
6-
use plotters_bitmap::bitmap_pixel::{BGRXPixel, PixelFormat, RGBPixel};
6+
7+
use plotters_bitmap::bitmap_pixel::PixelFormat;
8+
9+
#[cfg(all(not(target_arch = "wasm32"), feature = "image"))]
10+
use plotters_bitmap::bitmap_pixel::{BGRXPixel, RGBPixel};
11+
712
use plotters_bitmap::BitMapBackend;
813

914
use std::borrow::Borrow;

0 commit comments

Comments
 (0)