From 7672150c4c86272b017c2054aefc51f50464dd4e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 24 Aug 2023 10:28:01 +0200 Subject: [PATCH] cleanup: drop unnecessary to_owned call Signed-off-by: Wolfgang Bumiller --- pbs-client/src/pxar/create.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs index 2a539957..0d7599f5 100644 --- a/pbs-client/src/pxar/create.rs +++ b/pbs-client/src/pxar/create.rs @@ -439,11 +439,7 @@ impl Archiver { let mut stat_results: Option = None; let get_file_mode = || { - nix::sys::stat::fstatat( - dir_fd, - file_name.to_owned().as_c_str(), - nix::fcntl::AtFlags::AT_SYMLINK_NOFOLLOW, - ) + nix::sys::stat::fstatat(dir_fd, file_name, nix::fcntl::AtFlags::AT_SYMLINK_NOFOLLOW) }; match self