summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-14 00:45:38 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-14 00:45:38 +0100
commit69ed631d449e74b38054aa052c620368cb65c72c (patch)
tree99f2ad57566ae15f4e03a4912ce01f1db1e31a4e /examples
parentf0381a7fb305a371208df62d339540ce3d48f9da (diff)
downloadiced-69ed631d449e74b38054aa052c620368cb65c72c.tar.gz
iced-69ed631d449e74b38054aa052c620368cb65c72c.tar.bz2
iced-69ed631d449e74b38054aa052c620368cb65c72c.zip
Rename `timer` example to `stopwatch`
Diffstat (limited to '')
-rw-r--r--examples/stopwatch.rs (renamed from examples/timer.rs)12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/timer.rs b/examples/stopwatch.rs
index 367c5b2b..4f931278 100644
--- a/examples/timer.rs
+++ b/examples/stopwatch.rs
@@ -6,10 +6,10 @@ use iced::{
use std::time::{Duration, Instant};
pub fn main() {
- Timer::run(Settings::default())
+ Stopwatch::run(Settings::default())
}
-struct Timer {
+struct Stopwatch {
duration: Duration,
state: State,
toggle: button::State,
@@ -28,12 +28,12 @@ enum Message {
Tick(Instant),
}
-impl Application for Timer {
+impl Application for Stopwatch {
type Message = Message;
- fn new() -> (Timer, Command<Message>) {
+ fn new() -> (Stopwatch, Command<Message>) {
(
- Timer {
+ Stopwatch {
duration: Duration::default(),
state: State::Idle,
toggle: button::State::new(),
@@ -44,7 +44,7 @@ impl Application for Timer {
}
fn title(&self) -> String {
- String::from("Timer - Iced")
+ String::from("Stopwatch - Iced")
}
fn update(&mut self, message: Message) -> Command<Message> {