Skip to content

Commit

Permalink
Ran 'cargo fmt' and 'cargo clippy'.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizzen-yazston committed Jul 18, 2024
1 parent 5815723 commit 0872e23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
5 changes: 1 addition & 4 deletions examples/menu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,7 @@ fn labeled_button(
label: &str,
msg: Message,
) -> button::Button<Message, iced::Theme, iced::Renderer> {
base_button(
text(label).align_y(alignment::Vertical::Center),
msg,
)
base_button(text(label).align_y(alignment::Vertical::Center), msg)
}

fn debug_button(label: &str) -> button::Button<Message, iced::Theme, iced::Renderer> {
Expand Down
12 changes: 8 additions & 4 deletions examples/sidebar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ impl From<Icon> for char {
}

fn main() -> iced::Result {
iced::application("Sidebar example", TabBarExample::update, TabBarExample::view)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(ICON_BYTES)
.run()
iced::application(
"Sidebar example",
TabBarExample::update,
TabBarExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(ICON_BYTES)
.run()
}

#[derive(Default)]
Expand Down
18 changes: 2 additions & 16 deletions src/widgets/sidebar/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,14 +852,7 @@ fn draw_tab<Theme, Renderer>(
let cross_layout = children
.next()
.expect("Graphics: Expected close icon layout.");
render_close(
renderer,
&style,
cross_layout,
cursor,
close_size,
viewport,
);
render_close(renderer, &style, cross_layout, cursor, close_size, viewport);
let label_layout = children
.next()
.expect("Graphics: Layout should have a label layout");
Expand Down Expand Up @@ -889,14 +882,7 @@ fn draw_tab<Theme, Renderer>(
let cross_layout = children
.next()
.expect("Graphics: Expected close icon layout.");
render_close(
renderer,
&style,
cross_layout,
cursor,
close_size,
viewport,
);
render_close(renderer, &style, cross_layout, cursor, close_size, viewport);
}
}
} else {
Expand Down

0 comments on commit 0872e23

Please sign in to comment.