From 14db8b52dca4d4b9bbc562b9cc8166381b1b5113 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 10 Sep 2020 06:37:37 +0200 Subject: [PATCH] src/backup/chunk_store.rs: use ? insteadf of unwrap --- src/backup/chunk_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backup/chunk_store.rs b/src/backup/chunk_store.rs index 7f5c0693..df7d9142 100644 --- a/src/backup/chunk_store.rs +++ b/src/backup/chunk_store.rs @@ -326,7 +326,7 @@ impl ChunkStore { if let Ok(stat) = fstatat(dirfd, filename, nix::fcntl::AtFlags::AT_SYMLINK_NOFOLLOW) { if bad { // filename validity checked in iterator - let orig_filename = std::ffi::CString::new(&filename.to_bytes()[..64]).unwrap(); + let orig_filename = std::ffi::CString::new(&filename.to_bytes()[..64])?; match fstatat( dirfd, orig_filename.as_c_str(),