Fixed doc tests running.

Fortune for termprogress's current commit: Half blessing − 半吉
master
Avril 9 months ago
parent 8d826ac3ad
commit 16df2d9cdf
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -14,6 +14,7 @@ use std::{
///
/// To create a new `progress::Bar` with a max size tuned to your terminal (or `Width+20`, if it cannot be detected), and of the default size, `Bar` implements the `Default` trait:
/// ```rust
/// # use termprogress::prelude::*;
/// let mut bar = Bar::default(); //Creates a bar of width 50 by default.
/// ```
///
@ -96,7 +97,9 @@ impl Bar
progress: 0.0,
buffer: String::with_capacity(width),
title: String::with_capacity(max_width - width),
#[cfg(feature="size")]
fit_to_term: false,
/*output_to: io::stdout(),*/
};
this.update();
this

@ -10,6 +10,7 @@ use super::*;
/// To use the spinner you can provide it a `Wheel` (see [[wheel]] module), or it implements the `Default` trait, creating a traditional looking spinner (`|/-\`)
///
/// ```rust
/// # use termprogress::prelude::*;
/// let mut spin = Spin::default(); //Default new spinner without a title.
/// ```
///
@ -42,6 +43,7 @@ impl Spin
///
/// # Example
/// ```rust
/// # use termprogress::prelude::*;
/// Spin::new(Default::default()); // Create a spinner with the default wheel ('|/-\')
/// ```
pub fn new(whl: wheel::Wheel) -> Self

Loading…
Cancel
Save