From a6cce425f4b8b3d6a69a0452175965787216c90a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 20 May 2019 21:37:49 +0300 Subject: [PATCH] clarify confusing bits about messages --- src/progress.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/progress.rs b/src/progress.rs index 67c4a937..496ada27 100644 --- a/src/progress.rs +++ b/src/progress.rs @@ -445,6 +445,8 @@ impl ProgressBar { /// let pb = ProgressBar::new(n); /// pb.set_draw_delta(n / 100); // redraw every 1% of additional progress /// ``` + /// + /// Note that `ProgressDrawTarget` may impose additional buffering of redraws. pub fn set_draw_delta(&self, n: u64) { let mut state = self.state.write(); state.draw_delta = n; @@ -535,6 +537,9 @@ impl ProgressBar { } /// Sets the current message of the progress bar. + /// + /// For the message to be visible, `{msg}` placeholder + /// must be present in the template (see `ProgressStyle`). pub fn set_message(&self, msg: &str) { let msg = msg.to_string(); self.update_and_draw(|state| {