summaryrefslogtreecommitdiffstats
path: root/examples/clock
diff options
context:
space:
mode:
Diffstat (limited to 'examples/clock')
-rw-r--r--examples/clock/Cargo.toml6
-rw-r--r--examples/clock/src/main.rs4
2 files changed, 6 insertions, 4 deletions
diff --git a/examples/clock/Cargo.toml b/examples/clock/Cargo.toml
index 5e869eb5..2d3d5908 100644
--- a/examples/clock/Cargo.toml
+++ b/examples/clock/Cargo.toml
@@ -6,5 +6,7 @@ edition = "2021"
publish = false
[dependencies]
-iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
-time = { version = "0.3.5", features = ["local-offset"] }
+iced.workspace = true
+iced.features = ["canvas", "tokio", "debug"]
+
+time = { version = "0.3", features = ["local-offset"] }
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index fae77bc0..920aa0c5 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -35,7 +35,7 @@ impl Application for Clock {
Clock {
now: time::OffsetDateTime::now_local()
.unwrap_or_else(|_| time::OffsetDateTime::now_utc()),
- clock: Default::default(),
+ clock: Cache::default(),
},
Command::none(),
)
@@ -141,7 +141,7 @@ impl<Message> canvas::Program<Message, Renderer> for Clock {
frame.with_save(|frame| {
frame.rotate(hand_rotation(self.now.second(), 60));
frame.stroke(&long_hand, thin_stroke());
- })
+ });
});
vec![clock]