Skip to content

Commit 961e7f6

Browse files
committed
Consistently default to stderr. Fixes console-rs#38
1 parent 016fb39 commit 961e7f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//!
3939
//! <img src="https://github.com/mitsuhiko/indicatif/raw/master/screenshots/yarn.gif?raw=true" width="60%">
4040
//!
41-
//! Progress bars are manually advanced and by default draw to stdout.
41+
//! Progress bars are manually advanced and by default draw to stderr.
4242
//! When you are done, the progress bar can be finished either visibly
4343
//! (eg: the progress bar stays on the screen) or cleared (the progress
4444
//! bar will be removed).

src/progress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl ProgressState {
423423
if let Some(width) = self.width {
424424
width as usize
425425
} else {
426-
Term::stdout().size().1 as usize
426+
Term::stderr().size().1 as usize
427427
}
428428
}
429429

@@ -496,7 +496,7 @@ impl ProgressBar {
496496

497497
/// Creates a new spinner.
498498
///
499-
/// This spinner by default draws directly to stdout. This adds the
499+
/// This spinner by default draws directly to stderr This adds the
500500
/// default spinner style to it.
501501
pub fn new_spinner() -> ProgressBar {
502502
let rv = ProgressBar::new(!0);

0 commit comments

Comments
 (0)