From 3592d70fd18686ca984db32204e6dcccd05731eb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 15 Sep 2015 00:11:45 +0200 Subject: vtcol.rs: update for rustc 1.4 --- src/vtcol.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/vtcol.rs b/src/vtcol.rs index 03a8258..e4f0b06 100644 --- a/src/vtcol.rs +++ b/src/vtcol.rs @@ -1,13 +1,24 @@ #![feature(libc)] #![feature(rustc_private)] -#![feature(collections)] #![feature(convert)] +/* Core appears to require some extra handholding … + */ +#![feature(core)] +#![feature(core_slice_ext)] +#![feature(core_str_ext)] + extern crate libc; extern crate getopts; +extern crate core; use std::io::BufRead; +/* Various traits. + */ +use core::slice::SliceExt; +use core::str::StrExt; + type Fd = libc::c_int; static mut VERBOSITY : u8 = 0_u8; @@ -72,10 +83,8 @@ impl Color { s : &str) -> String { - if b { - return String::from_str("bright ") + s; - } - String::from_str(s) + if b { "bright ".to_string() + s } + else { s.to_string() } } fn -- cgit v1.2.3