summaryrefslogtreecommitdiffstats
path: root/examples/stopwatch/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-05-23 13:38:22 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-23 13:38:22 +0200
commit663a081bdd507da0b5ca7d4dc30d78a20b4618af (patch)
tree89482c8d1e3a03e00b3a8151abbb81e30ae5898c /examples/stopwatch/src
parent468794d918eb06c1dbebb33c32b10017ad335f05 (diff)
parentd8ba6b0673a33724a177f3a1ba59705527280142 (diff)
downloadiced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.tar.gz
iced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.tar.bz2
iced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.zip
Merge pull request #2338 from derezzedex/feat/text-macro
Introduce `text` macro
Diffstat (limited to 'examples/stopwatch/src')
-rw-r--r--examples/stopwatch/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs
index bbe9d0ff..a8149753 100644
--- a/examples/stopwatch/src/main.rs
+++ b/examples/stopwatch/src/main.rs
@@ -92,13 +92,13 @@ impl Stopwatch {
let seconds = self.duration.as_secs();
- let duration = text(format!(
+ let duration = text!(
"{:0>2}:{:0>2}:{:0>2}.{:0>2}",
seconds / HOUR,
(seconds % HOUR) / MINUTE,
seconds % MINUTE,
self.duration.subsec_millis() / 10,
- ))
+ )
.size(40);
let button = |label| {