Skip to content

Commit 1d418e3

Browse files
committed
refactor: use shorthand fields
1 parent 861e577 commit 1d418e3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/render.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'a> Primitives<'a> {
344344
let color = style.get_color(theme);
345345
match *style {
346346
ShapeStyle::Fill(_) => {
347-
let kind = PrimitiveKind::Rectangle { color: color };
347+
let kind = PrimitiveKind::Rectangle { color };
348348
return Some(new_primitive(id, kind, scizzor, rect));
349349
},
350350
ShapeStyle::Outline(ref line_style) => {
@@ -652,7 +652,7 @@ impl<'a> Primitives<'a> {
652652
match kind {
653653

654654
PrimitiveKind::Rectangle { color } => {
655-
let kind = OwnedPrimitiveKind::Rectangle { color: color };
655+
let kind = OwnedPrimitiveKind::Rectangle { color };
656656
primitives.push(new(kind));
657657
},
658658

@@ -801,7 +801,7 @@ impl<'a> WalkOwnedPrimitives<'a> {
801801
match *kind {
802802

803803
OwnedPrimitiveKind::Rectangle { color } => {
804-
let kind = PrimitiveKind::Rectangle { color: color };
804+
let kind = PrimitiveKind::Rectangle { color };
805805
new(kind)
806806
},
807807

src/widget/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl<D, S> List<D, S>
266266
style: style,
267267
num_items: num_items,
268268
item_instantiation: ItemInstantiation::OnlyVisible,
269-
item_size: Fixed { length: length },
269+
item_size: Fixed { length },
270270
direction: std::marker::PhantomData,
271271
}
272272
}

src/widget/list_select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl<M, D, S> ListSelect<M, D, S>
258258
num_items: num_items,
259259
mode: mode,
260260
direction: direction,
261-
item_size: widget::list::Fixed { length: length },
261+
item_size: widget::list::Fixed { length },
262262
style: style,
263263
item_instantiation: widget::list::ItemInstantiation::OnlyVisible,
264264
}

0 commit comments

Comments
 (0)