Skip to content

Commit

Permalink
chore: cleanup iced_widget
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Nov 28, 2023
1 parent 8dc5c74 commit 3ae629b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion widget/src/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ where
}

fn diff(&mut self, tree: &mut Tree) {
let children = std::slice::from_mut(&mut self.content);
tree.diff_children(std::slice::from_mut(&mut self.content))
}

Expand Down
4 changes: 2 additions & 2 deletions widget/src/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::core::touch;
use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
id::Internal, Alignment, Clipboard, Element, Layout, Length, Pixels,
Rectangle, Shell, Widget,
id::Internal, Clipboard, Element, Layout, Length, Pixels, Rectangle, Shell,
Widget,
};

pub use iced_style::checkbox::{Appearance, StyleSheet};
Expand Down
2 changes: 1 addition & 1 deletion widget/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn layout<Renderer, Handle>(
width: Length,
height: Length,
content_fit: ContentFit,
border_radius: [f32; 4],
_border_radius: [f32; 4],
) -> layout::Node
where
Renderer: image::Renderer<Handle = Handle>,
Expand Down
2 changes: 2 additions & 0 deletions widget/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ where
content_fit: ContentFit,
symbolic: bool,
style: <Renderer::Theme as StyleSheet>::Style,
phantom_data: std::marker::PhantomData<&'a ()>,
}

impl<'a, Renderer> Svg<'a, Renderer>
Expand All @@ -65,6 +66,7 @@ where
content_fit: ContentFit::Contain,
symbolic: false,
style: Default::default(),
phantom_data: std::marker::PhantomData,
}
}

Expand Down
4 changes: 2 additions & 2 deletions widget/src/toggler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::core::touch;
use crate::core::widget::tree::{self, Tree};
use crate::core::widget::{self, Id};
use crate::core::{
id, Alignment, Clipboard, Element, Event, Layout, Length, Pixels,
Rectangle, Shell, Widget,
id, Clipboard, Element, Event, Layout, Length, Pixels, Rectangle, Shell,
Widget,
};

pub use crate::style::toggler::{Appearance, StyleSheet};
Expand Down

0 comments on commit 3ae629b

Please sign in to comment.