Don't call closures immediately, use try{}
blocks
This commit is contained in:
parent
bddbf38af2
commit
360e978437
10 changed files with 88 additions and 115 deletions
|
@ -559,7 +559,7 @@ fn write_out_deps(
|
|||
}
|
||||
let deps_filename = outputs.path(OutputType::DepInfo);
|
||||
|
||||
let result = (|| -> io::Result<()> {
|
||||
let result: io::Result<()> = try {
|
||||
// Build a list of files used to compile the output and
|
||||
// write Makefile-compatible dependency rules
|
||||
let mut files: Vec<String> = sess
|
||||
|
@ -646,9 +646,7 @@ fn write_out_deps(
|
|||
writeln!(file)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})();
|
||||
};
|
||||
|
||||
match result {
|
||||
Ok(_) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue