mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
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: <https://github.com/rust-lang/rust/blob/master/RELEASES.md>
This commit is contained in:
parent
c22cf215ba
commit
b4b0ee40d7
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ pub fn log_info<T: AsRef<str>, U: AsRef<str>>(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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue