diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 5f094d851fb06..622bc025ced81 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -23,10 +23,13 @@ //! //! fn main() { //! let mut t = term::stdout().unwrap(); +//! //! t.fg(term::color::GREEN).unwrap(); -//! println!("hello, "); +//! (write!(t, "hello, ")).unwrap(); +//! //! t.fg(term::color::RED).unwrap(); -//! println!("world!"); +//! (writeln!(t, "world!")).unwrap(); +//! //! t.reset().unwrap(); //! } //! ```