summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-09-15 00:11:45 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2015-09-15 00:11:45 +0200
commit3592d70fd18686ca984db32204e6dcccd05731eb (patch)
tree8761d095e0c4801554193a653076890b34f50bed /src
parentce3c1b9402393a3fd126433f1c67428c66c74a80 (diff)
downloadvtcol-3592d70fd18686ca984db32204e6dcccd05731eb.tar.gz
vtcol.rs: update for rustc 1.4
Diffstat (limited to 'src')
-rw-r--r--src/vtcol.rs19
1 files 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