diff options
| author | Corey Richardson <corey@octayn.net> | 2014-02-02 02:56:55 -0500 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2014-02-02 03:08:56 -0500 |
| commit | 25fe2cadb10db1a54cefbd1520708d4397874bc3 (patch) | |
| tree | 28deddc8ce51ef66f428be8f123f7b53d1119b32 /src/librustpkg/messages.rs | |
| parent | 3e39e3e80dcf726a96ec0fe778f96e2a9dde620b (diff) | |
| download | rust-25fe2cadb10db1a54cefbd1520708d4397874bc3.tar.gz rust-25fe2cadb10db1a54cefbd1520708d4397874bc3.zip | |
Remove rustpkg.
I'm sorry :'( Closes #11859
Diffstat (limited to 'src/librustpkg/messages.rs')
| -rw-r--r-- | src/librustpkg/messages.rs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/librustpkg/messages.rs b/src/librustpkg/messages.rs deleted file mode 100644 index dbd0ee80f28..00000000000 --- a/src/librustpkg/messages.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use extra::term; -use std::io; - -pub fn note(msg: &str) { - pretty_message(msg, "note: ", term::color::GREEN); -} - -pub fn warn(msg: &str) { - pretty_message(msg, "warning: ", term::color::YELLOW); -} - -pub fn error(msg: &str) { - pretty_message(msg, "error: ", term::color::RED); -} - -fn pretty_message<'a>(msg: &'a str, - prefix: &'a str, - color: term::color::Color) { - let mut term = term::Terminal::new(io::stdout()); - let mut stdout = io::stdout(); - match term { - Ok(ref mut t) => { - t.fg(color); - t.write(prefix.as_bytes()); - t.reset(); - }, - _ => { - stdout.write(prefix.as_bytes()); - } - } - stdout.write(msg.as_bytes()); - stdout.write(['\n' as u8]); -} |
