From d0d629caeeca193cc897e2721239c57bf1f62426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 7 Apr 2023 18:48:55 +0300 Subject: [PATCH] Mention the prefix and message placeholders in the with_ docs --- src/progress_bar.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/progress_bar.rs b/src/progress_bar.rs index ad10f3e0..0563be6d 100644 --- a/src/progress_bar.rs +++ b/src/progress_bar.rs @@ -80,6 +80,9 @@ impl ProgressBar { } /// A convenience builder-like function for a progress bar with a given prefix + /// + /// For the prefix to be visible, the `{prefix}` placeholder must be present in the template + /// (see [`ProgressStyle`]). pub fn with_prefix(self, prefix: impl Into>) -> Self { let mut state = self.state(); state.state.prefix = TabExpandedString::new(prefix.into(), state.tab_width); @@ -88,6 +91,9 @@ impl ProgressBar { } /// A convenience builder-like function for a progress bar with a given message + /// + /// For the message to be visible, the `{msg}` placeholder must be present in the template (see + /// [`ProgressStyle`]). pub fn with_message(self, message: impl Into>) -> Self { let mut state = self.state(); state.state.message = TabExpandedString::new(message.into(), state.tab_width);