Skip to content

Commit 00a8b15

Browse files
committed
fix clippy
1 parent 8b43512 commit 00a8b15

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ fn ui_root() -> impl Element {
9696
fn counter_button(counter_holder: LazyEntity, label: &'static str, step: i32) -> impl Element {
9797
let lazy_entity = LazyEntity::new();
9898
El::<Node>::new()
99-
.with_node(|mut node| node.width = Val::Px(45.0))
99+
.with_node(|mut node| {
100+
node.width = Val::Px(45.0);
101+
node.border_radius = BorderRadius::MAX;
102+
})
100103
.insert((Pickable::default(), Hoverable))
101104
.align_content(Align::center())
102-
.border_radius(BorderRadius::MAX)
103105
.cursor(CursorIcon::System(SystemCursorIcon::Pointer))
104106
.lazy_entity(lazy_entity.clone())
105107
.background_color_signal(

examples/futures_signals_jonmo_compat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ fn futures_signals_button() -> impl Element {
4646
node.width = Val::Px(150.0);
4747
node.height = Val::Px(65.);
4848
node.border = UiRect::all(Val::Px(5.0));
49+
node.border_radius = BorderRadius::MAX;
4950
})
5051
.align_content(Align::center())
5152
.border_color_signal(
@@ -76,7 +77,6 @@ fn futures_signals_button() -> impl Element {
7677
})
7778
.map(BackgroundColor),
7879
)
79-
.border_radius(BorderRadius::MAX)
8080
.hovered_sync(hovered)
8181
.pressed_sync(pressed)
8282
.child(
@@ -120,10 +120,10 @@ fn jonmo_button() -> impl jElement {
120120
node.width = Val::Px(150.0);
121121
node.height = Val::Px(65.);
122122
node.border = UiRect::all(Val::Px(5.0));
123+
node.border_radius = BorderRadius::MAX;
123124
})
124125
.insert((Pickable::default(), Hoverable, Pressable, Draggable))
125126
.align_content(jAlign::center())
126-
.border_radius(BorderRadius::MAX)
127127
.lazy_entity(lazy_entity)
128128
.border_color_signal(
129129
pressed_hovered

0 commit comments

Comments
 (0)