Skip to content

Commit cbe75b2

Browse files
committed
refactor: use shorthand fields
1 parent d31593e commit cbe75b2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

conrod_core/src/render.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub enum PrimitiveKind<'a> {
102102
/// `Rectangle` widget produces a single `Rectangle`. The `BorderedRectangle` produces two
103103
/// `Rectangle`s, the first for the outer border and the second for the inner on top.
104104
Rectangle {
105-
/// The fill colour for the rectangle.
105+
/// The fill colour for the rectangle.
106106
color: Color
107107
},
108108

@@ -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

conrod_core/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
}

conrod_core/src/widget/list_select.rs

Lines changed: 2 additions & 2 deletions
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
}
@@ -484,7 +484,7 @@ impl<M, D, S> Events<M, D, S>
484484
&is_selected, pending_events);
485485
}
486486
},
487-
487+
488488
event::Widget::Tap(_) => {
489489
let dummy_click=event::Click{
490490
button:Button::Left,

0 commit comments

Comments
 (0)