Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
Change snippet about styling ParallelProgressIterator
  • Loading branch information
LeCyberDucky authored and djc committed Aug 11, 2021
1 parent 85d78ac commit 27c8cc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Expand Up @@ -107,13 +107,13 @@
//!
//! ```rust,ignore
//! # extern crate rayon;
//! use indicatif::{ProgressBar, ParallelProgressIterator};
//! use indicatif::{ProgressBar, ParallelProgressIterator, ProgressStyle};
//! use rayon::iter::{ParallelIterator, IntoParallelRefIterator};
//!
//! // Use `ProgressBar::with_style` to change the view
//! let pb = ProgressBar::new();
//! // Alternatively, use `ProgressBar::new().with_style()`
//! let style = ProgressStyle::default_bar();
//! let v: Vec<_> = (0..100000).collect();
//! let v2: Vec<_> = v.par_iter().progress_with(pb).map(|i| i + 1).collect();
//! let v2: Vec<_> = v.par_iter().progress_with_style(style).map(|i| i + 1).collect();
//! assert_eq!(v2[0], 1);
//! ```
//!
Expand Down

0 comments on commit 27c8cc3

Please sign in to comment.