From b4b0ee40d708111b7ddff57493b70cf3e8962a7e Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 7 Dec 2019 22:02:50 -0600 Subject: [PATCH] refactor/polish ~ convert to `try!` to `?` syntax - convert to newer `?` syntax, fixing compiler warnings + requires MinSRV >= v1.13.0 .# [why] The `?` operator was stabilized in rust v1.13.0. Warnings requesting conversion from the old `try!` macro to the `?` operator were introduced in rust v1.39.0. * ref: --- tests/common/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index 43e83f1e6..756107d44 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -163,7 +163,7 @@ pub fn log_info, U: AsRef>(msg: T, par: U) { pub fn recursive_copy(src: &Path, dest: &Path) -> Result<()> { if fs::metadata(src)?.is_dir() { - for entry in try!(fs::read_dir(src)) { + for entry in fs::read_dir(src)? { let entry = entry?; let mut new_dest = PathBuf::from(dest); new_dest.push(entry.file_name());