From 154dfb59fe301035d047cf4935f76bc612b6ff20 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Sat, 17 May 2014 11:53:38 -0700 Subject: [PATCH] term: update example to be right (thanks @SiegeLord) --- src/libterm/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 5f094d851fb0..622bc025ced8 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(); //! } //! ```