summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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