summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-03 17:18:05 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-03 17:18:05 +0700
commitf56c8a7361ceb215bce68e88bd6ce402e2694693 (patch)
treeec4d7ef8a63cf9ce0a77c28c9beeeaa7f3d64efc /examples
parent76c03de58729783513504f8115d7381f9a52fd23 (diff)
downloadiced-f56c8a7361ceb215bce68e88bd6ce402e2694693.tar.gz
iced-f56c8a7361ceb215bce68e88bd6ce402e2694693.tar.bz2
iced-f56c8a7361ceb215bce68e88bd6ce402e2694693.zip
Ask for a slice of segments instead of ownership in `LineDash`
Diffstat (limited to 'examples')
-rw-r--r--examples/clock/src/main.rs4
-rw-r--r--examples/solar_system/src/main.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index fce57cc0..325ccc1a 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -100,14 +100,14 @@ impl canvas::Program<Message> for Clock {
let wide_stroke = Stroke {
width: thin_stroke.width * 3.0,
- ..thin_stroke.clone()
+ ..thin_stroke
};
frame.translate(Vector::new(center.x, center.y));
frame.with_save(|frame| {
frame.rotate(hand_rotation(self.now.hour(), 12));
- frame.stroke(&short_hand, wide_stroke.clone());
+ frame.stroke(&short_hand, wide_stroke);
});
frame.with_save(|frame| {
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs
index fb782d9c..12184dd1 100644
--- a/examples/solar_system/src/main.rs
+++ b/examples/solar_system/src/main.rs
@@ -165,7 +165,7 @@ impl<Message> canvas::Program<Message> for State {
color: Color::from_rgba8(0, 153, 255, 0.1),
line_dash: canvas::LineDash {
offset: 0,
- segments: vec![3.0, 6.0],
+ segments: &[3.0, 6.0],
},
..Stroke::default()
},