From 55ec80729147b4c948dc0919569451ac40d2e7ba Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 29 Jan 2023 17:42:06 +0000 Subject: Immutably borrow rather than consuming paths --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 569f964..3ffbb69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,9 +12,9 @@ use std::panic; use std::path::Path; use std::process; -fn create_and_open_dir + Copy>( +fn create_and_open_dir + ?Sized>( d: &Dir, - path: P, + path: &P, ) -> std::io::Result { if let Err(e) = d.create_dir(path) { if e.kind() != ErrorKind::AlreadyExists { -- cgit v1.2.3-54-g00ecf