about summary refs log tree commit diff
path: root/src/libterm
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-04-25 01:08:02 -0700
committerBrian Anderson <banderson@mozilla.com>2014-05-02 23:00:58 -0700
commita5be12ce7e88c1d28de1c98215991127d1e765f0 (patch)
tree30f160f43a354c79a6795c638c3302d234ec0b52 /src/libterm
parenta67307e2a56b0d6bc57c3dc18f58e79744e98434 (diff)
Replace most ~exprs with 'box'. #11779
Diffstat (limited to 'src/libterm')
-rw-r--r--src/libterm/terminfo/parser/compiled.rs9
-rw-r--r--src/libterm/terminfo/searcher.rs4
2 files changed, 9 insertions, 4 deletions
diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs
index e27f4652305..538a1513d65 100644
--- a/src/libterm/terminfo/parser/compiled.rs
+++ b/src/libterm/terminfo/parser/compiled.rs
@@ -294,7 +294,12 @@ pub fn parse(file: &mut io::Reader,
     }
 
     // And that's all there is to it
-    Ok(~TermInfo {names: term_names, bools: bools_map, numbers: numbers_map, strings: string_map })
+    Ok(box TermInfo {
+        names: term_names,
+        bools: bools_map,
+        numbers: numbers_map,
+        strings: string_map
+    })
 }
 
 /// Create a dummy TermInfo struct for msys terminals
@@ -304,7 +309,7 @@ pub fn msys_terminfo() -> ~TermInfo {
     strings.insert("bold".to_owned(), Vec::from_slice(bytes!("\x1b[1m")));
     strings.insert("setaf".to_owned(), Vec::from_slice(bytes!("\x1b[3%p1%dm")));
     strings.insert("setab".to_owned(), Vec::from_slice(bytes!("\x1b[4%p1%dm")));
-    ~TermInfo {
+    box TermInfo {
         names: vec!("cygwin".to_owned()), // msys is a fork of an older cygwin version
         bools: HashMap::new(),
         numbers: HashMap::new(),
diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs
index 12540f52581..a491f7e863e 100644
--- a/src/libterm/terminfo/searcher.rs
+++ b/src/libterm/terminfo/searcher.rs
@@ -62,13 +62,13 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
             let f = str::from_char(first_char);
             let newp = p.join_many([f.as_slice(), term]);
             if newp.exists() {
-                return Some(~newp);
+                return Some(box newp);
             }
             // on some installations the dir is named after the hex of the char (e.g. OS X)
             let f = format!("{:x}", first_char as uint);
             let newp = p.join_many([f.as_slice(), term]);
             if newp.exists() {
-                return Some(~newp);
+                return Some(box newp);
             }
         }
     }