about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-07-28 09:31:37 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-08-07 08:16:37 -0700
commit5c08237456c3d6b4c9553ebe2f13eba5b97a4e09 (patch)
treeb1b66a46b2d865102b6615081141ca64fc7b8337 /src
parent54c8c23d0582037e525fba917fb865bfba0e9b78 (diff)
downloadrust-5c08237456c3d6b4c9553ebe2f13eba5b97a4e09.tar.gz
rust-5c08237456c3d6b4c9553ebe2f13eba5b97a4e09.zip
option.get -> option.unwrap
Diffstat (limited to 'src')
-rw-r--r--src/compiletest/runtest.rs5
-rw-r--r--src/libextra/workcache.rs4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 5c1cc78d678..0d1c5c8eb43 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -162,9 +162,8 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
         round += 1;
     }
 
-    let mut expected =
-        match props.pp_exact {
-          Some(ref file) => {
+    let mut expected = match props.pp_exact {
+        Some(ref file) => {
             let filepath = testfile.dir_path().push_rel(file);
             io::read_whole_file_str(&filepath).unwrap()
           }
diff --git a/src/libextra/workcache.rs b/src/libextra/workcache.rs
index 0256519abb7..b4ba8acae47 100644
--- a/src/libextra/workcache.rs
+++ b/src/libextra/workcache.rs
@@ -221,7 +221,7 @@ fn digest<T:Encodable<json::Encoder>>(t: &T) -> ~str {
 fn digest_file(path: &Path) -> ~str {
     let mut sha = ~Sha1::new();
     let s = io::read_whole_file_str(path);
-    (*sha).input_str(*s.get_ref());
+    (*sha).input_str(s.unwrap());
     (*sha).result_str()
 }
 
@@ -378,7 +378,7 @@ fn test() {
     let pth = Path("foo.c");
     {
         let r = io::file_writer(&pth, [io::Create]);
-        r.get_ref().write_str("int main() { return 0; }");
+        r.unwrap().write_str("int main() { return 0; }");
     }
 
     let cx = Context::new(RWArc::new(Database::new(Path("db.json"))),