Skip to content
This repository was archived by the owner on Aug 20, 2021. It is now read-only.

Commit 3adc0c1

Browse files
author
Paul Woolcock
committed
replace try! with ?
1 parent 1708bf0 commit 3adc0c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ fn write_temp_folder_with_files() -> Result<(), io::Error> {
3939
let file_path = dir.path().join("foo.txt");
4040
println!("{:?}", file_path);
4141

42-
let mut f = try!(File::create(file_path));
43-
try!(f.write_all(b"Hello, world!"));
44-
try!(f.sync_all());
45-
try!(dir.close());
42+
let mut f = File::create(file_path)?;
43+
f.write_all(b"Hello, world!")?;
44+
f.sync_all()?;
45+
dir.close()?;
4646
}
4747
Ok(())
4848
}

0 commit comments

Comments
 (0)