about summary refs log tree commit diff
path: root/src/libterm/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libterm/lib.rs')
-rw-r--r--src/libterm/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index 84ba122631e..9e3be403065 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -129,7 +129,7 @@ impl<T: Writer> Terminal<T> {
     pub fn new(out: T) -> Result<Terminal<T>, ~str> {
         let term = match os::getenv("TERM") {
             Some(t) => t,
-            None => return Err(~"TERM environment variable undefined")
+            None => return Err("TERM environment variable undefined".to_owned())
         };
 
         let mut file = match open(term) {
@@ -251,7 +251,7 @@ impl<T: Writer> Terminal<T> {
                 cap = self.ti.strings.find_equiv(&("op"));
             }
         }
-        let s = cap.map_or(Err(~"can't find terminfo capability `sgr0`"), |op| {
+        let s = cap.map_or(Err("can't find terminfo capability `sgr0`".to_owned()), |op| {
             expand(op.as_slice(), [], &mut Variables::new())
         });
         if s.is_ok() {