diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-01-29 17:42:06 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-01-29 17:42:06 +0000 |
commit | 55ec80729147b4c948dc0919569451ac40d2e7ba (patch) | |
tree | 70e59fa361636bb0ea055a50ea2f2facbd13284d | |
parent | 8700f1a4e37b946f7f5c452a6677a3da3e9d11fa (diff) | |
download | pam_usercg_rust-55ec80729147b4c948dc0919569451ac40d2e7ba.tar.gz pam_usercg_rust-55ec80729147b4c948dc0919569451ac40d2e7ba.tar.xz pam_usercg_rust-55ec80729147b4c948dc0919569451ac40d2e7ba.zip |
Immutably borrow rather than consuming paths
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,9 +12,9 @@ use std::panic; use std::path::Path; use std::process; -fn create_and_open_dir<P: AsRef<Path> + Copy>( +fn create_and_open_dir<P: AsRef<Path> + ?Sized>( d: &Dir, - path: P, + path: &P, ) -> std::io::Result<Dir> { if let Err(e) = d.create_dir(path) { if e.kind() != ErrorKind::AlreadyExists { |