(fix) fail! to panic!

This commit is contained in:
Jonathan Reem
2014-10-30 01:08:46 -07:00
parent 50a6f6103e
commit 60af7c4565
3 changed files with 5 additions and 5 deletions

View File

@@ -22,13 +22,13 @@ fn main() {
println!("GET {}...", url)
url
},
Err(e) => fail!("Invalid URL: {}", e)
Err(e) => panic!("Invalid URL: {}", e)
};
let req = match Request::get(url) {
Ok(req) => req,
Err(err) => fail!("Failed to connect: {}", err)
Err(err) => panic!("Failed to connect: {}", err)
};
let mut res = req
@@ -39,7 +39,7 @@ fn main() {
println!("{}", res.headers);
match copy(&mut res, &mut stdout()) {
Ok(..) => (),
Err(e) => fail!("Stream failure: {}", e)
Err(e) => panic!("Stream failure: {}", e)
};
}