diff --git a/simple-generated/src/app.rs b/simple-generated/src/app.rs index 7c749aa..bd56445 100644 --- a/simple-generated/src/app.rs +++ b/simple-generated/src/app.rs @@ -26,7 +26,8 @@ impl App { } pub fn run(mut self, mut terminal: DefaultTerminal) -> Result<()> { - let tick_interval = Duration::from_secs_f64(1.0 / 10.0); // 10 ticks per second + const TICKS_PER_SECOND: f64 = 10.0; + let tick_interval = Duration::from_secs_f64(1.0 / TICKS_PER_SECOND); let events = EventSource::new(tick_interval); self.running = true; while self.running { diff --git a/simple/src/app.rs b/simple/src/app.rs index 7c749aa..bd56445 100644 --- a/simple/src/app.rs +++ b/simple/src/app.rs @@ -26,7 +26,8 @@ impl App { } pub fn run(mut self, mut terminal: DefaultTerminal) -> Result<()> { - let tick_interval = Duration::from_secs_f64(1.0 / 10.0); // 10 ticks per second + const TICKS_PER_SECOND: f64 = 10.0; + let tick_interval = Duration::from_secs_f64(1.0 / TICKS_PER_SECOND); let events = EventSource::new(tick_interval); self.running = true; while self.running {