Skip to content

Commit

Permalink
remove re-export on
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed May 27, 2020
1 parent 5dd62ba commit 017be70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion native/src/widget/image.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Display images in your user interface.
pub mod viewer;
pub use viewer::{State, Viewer};
pub use viewer::Viewer;

use crate::{layout, Element, Hasher, Layout, Length, Point, Size, Widget};

Expand Down
4 changes: 3 additions & 1 deletion src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ mod platform {
#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
pub mod image {
//! Display images in your user interface.
pub use iced_winit::image::{Handle, Image, State, Viewer};
pub use iced_winit::image::{Handle, Image, Viewer};

pub use iced_winit::image::viewer;
}

#[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
Expand Down
9 changes: 6 additions & 3 deletions wgpu/src/renderer/widget/image/viewer.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use crate::{Primitive, Renderer};
use iced_native::{image, mouse, Rectangle, Vector};
use iced_native::{
image::{self, viewer},
mouse, Rectangle, Vector,
};

impl image::viewer::Renderer for Renderer {
impl viewer::Renderer for Renderer {
fn draw(
&mut self,
state: &image::State,
state: &viewer::State,
bounds: Rectangle,
image_bounds: Rectangle,
translation: Vector,
Expand Down

0 comments on commit 017be70

Please sign in to comment.