Skip to content

Commit 5c08237

Browse files
committed
option.get -> option.unwrap
1 parent 54c8c23 commit 5c08237

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/compiletest/runtest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
162162
round += 1;
163163
}
164164

165-
let mut expected =
166-
match props.pp_exact {
167-
Some(ref file) => {
165+
let mut expected = match props.pp_exact {
166+
Some(ref file) => {
168167
let filepath = testfile.dir_path().push_rel(file);
169168
io::read_whole_file_str(&filepath).unwrap()
170169
}

src/libextra/workcache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fn digest<T:Encodable<json::Encoder>>(t: &T) -> ~str {
221221
fn digest_file(path: &Path) -> ~str {
222222
let mut sha = ~Sha1::new();
223223
let s = io::read_whole_file_str(path);
224-
(*sha).input_str(*s.get_ref());
224+
(*sha).input_str(s.unwrap());
225225
(*sha).result_str()
226226
}
227227
@@ -378,7 +378,7 @@ fn test() {
378378
let pth = Path("foo.c");
379379
{
380380
let r = io::file_writer(&pth, [io::Create]);
381-
r.get_ref().write_str("int main() { return 0; }");
381+
r.unwrap().write_str("int main() { return 0; }");
382382
}
383383

384384
let cx = Context::new(RWArc::new(Database::new(Path("db.json"))),

0 commit comments

Comments
 (0)