mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Untry
This commit is contained in:
parent
7af5a7fd54
commit
316cd35767
34 changed files with 261 additions and 264 deletions
|
@ -11,10 +11,10 @@ use std::io::{self, Read};
|
|||
use std::path::{self, PathBuf};
|
||||
|
||||
fn read_file(path: &path::Path) -> io::Result<Vec<u8>> {
|
||||
let mut file = try!(File::open(path));
|
||||
let mut file = File::open(path)?;
|
||||
let mut buffer = Vec::new();
|
||||
|
||||
try!(file.read_to_end(&mut buffer));
|
||||
file.read_to_end(&mut buffer)?;
|
||||
|
||||
Ok(buffer)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue