Skip to content

Commit

Permalink
clarify confusing bits about messages (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad authored and mitsuhiko committed Sep 7, 2019
1 parent 9729504 commit 38a5ee6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/progress.rs
Expand Up @@ -455,6 +455,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().unwrap();
state.draw_delta = n;
Expand Down Expand Up @@ -546,6 +548,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| {
Expand Down

0 comments on commit 38a5ee6

Please sign in to comment.