summaryrefslogtreecommitdiffstats
path: root/examples/clock/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/clock/src/main.rs')
-rw-r--r--examples/clock/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index 2407db65..8b3a92c7 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -12,7 +12,7 @@ pub fn main() {
struct Clock {
now: LocalTime,
- clock: canvas::layer::Cache<LocalTime>,
+ clock: canvas::Cache,
}
#[derive(Debug, Clone, Copy)]
@@ -59,7 +59,7 @@ impl Application for Clock {
}
fn view(&mut self) -> Element<Message> {
- let canvas = Canvas::new(&mut self.clock, &self.now)
+ let canvas = Canvas::new(self.clock.with(&self.now))
.width(Length::Units(400))
.height(Length::Units(400));