From 51a1a19f92a66456858464a31e23796eca7ab9cb Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 28 Jul 2016 00:29:11 -0700 Subject: [PATCH] Fix progressbar doc --- src/view/progress_bar.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view/progress_bar.rs b/src/view/progress_bar.rs index cbc35d6..99fb01a 100644 --- a/src/view/progress_bar.rs +++ b/src/view/progress_bar.rs @@ -51,12 +51,12 @@ impl Counter { /// ``` /// # use cursive::prelude::*; /// let bar = ProgressBar::new() -/// .with_task(|ticker| { +/// .with_task(|counter| { /// // This closure is called in parallel. /// for _ in 0..100 { /// // Here we can communicate some /// // advancement back to the bar. -/// ticker(1); +/// counter.tick(1); /// } /// }); /// ``` @@ -115,10 +115,10 @@ impl ProgressBar { /// This does not reset the value, so it can be called several times /// to advance the progress in multiple sessions. pub fn start(&mut self, f: F) { - let ticker: Counter = self.value.clone(); + let counter: Counter = self.value.clone(); thread::spawn(move || { - f(ticker); + f(counter); }); }