Use closures for ProgressBar::style

This commit is contained in:
Héctor Ramón Jiménez 2024-03-12 15:45:21 +01:00
parent fd7a23ca47
commit 7a5f5b0be7
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 21 additions and 21 deletions

View file

@ -340,12 +340,12 @@ where
/// * the current value of the [`ProgressBar`].
///
/// [`ProgressBar`]: crate::ProgressBar
pub fn progress_bar<Theme>(
pub fn progress_bar<'a, Theme>(
range: RangeInclusive<f32>,
value: f32,
) -> ProgressBar<Theme>
) -> ProgressBar<'a, Theme>
where
Theme: progress_bar::DefaultStyle,
Theme: progress_bar::DefaultStyle + 'a,
{
ProgressBar::new(range, value)
}