Skip to content

Commit db7b134

Browse files
authored
Merge pull request #218 from ronnychevalier/rc/use_try_macro
config: use try! instead of ? to support rust 1.6.0
2 parents ee4c0f1 + 382f8f5 commit db7b134

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl Config {
266266
let out_dir = self.get_out_dir();
267267
let src = out_dir.join("flag_check.c");
268268
if !self.check_file_created {
269-
write!(fs::File::create(&src)?, "int main(void) {{ return 0; }}")?;
269+
try!(write!(try!(fs::File::create(&src)), "int main(void) {{ return 0; }}"));
270270
self.check_file_created = true;
271271
}
272272

@@ -284,7 +284,7 @@ impl Config {
284284
command_add_output_file(&mut cmd, &obj, target.contains("msvc"), false);
285285
cmd.arg(&src);
286286

287-
let output = cmd.output()?;
287+
let output = try!(cmd.output());
288288
Ok(output.stderr.is_empty())
289289
}
290290

0 commit comments

Comments
 (0)