File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ impl KVStore for FilesystemStore {
8686 std:: io:: Error :: new ( std:: io:: ErrorKind :: InvalidInput , msg)
8787 } ) ?
8888 . to_path_buf ( ) ;
89- fs:: create_dir_all ( parent_directory. clone ( ) ) ?;
89+ fs:: create_dir_all ( & parent_directory) ?;
9090
9191 // Do a crazy dance with lots of fsync()s to be overly cautious here...
9292 // We never want to end up in a state where we've lost the old data, or end up using the
@@ -106,7 +106,7 @@ impl KVStore for FilesystemStore {
106106 #[ cfg( not( target_os = "windows" ) ) ]
107107 {
108108 fs:: rename ( & tmp_file_path, & dest_file_path) ?;
109- let dir_file = fs:: OpenOptions :: new ( ) . read ( true ) . open ( parent_directory. clone ( ) ) ?;
109+ let dir_file = fs:: OpenOptions :: new ( ) . read ( true ) . open ( & parent_directory) ?;
110110 unsafe {
111111 libc:: fsync ( dir_file. as_raw_fd ( ) ) ;
112112 }
@@ -206,7 +206,7 @@ impl KVStore for FilesystemStore {
206206 return Ok ( Vec :: new ( ) ) ;
207207 }
208208
209- for entry in fs:: read_dir ( prefixed_dest. clone ( ) ) ? {
209+ for entry in fs:: read_dir ( & prefixed_dest) ? {
210210 let entry = entry?;
211211 let p = entry. path ( ) ;
212212
@@ -220,7 +220,7 @@ impl KVStore for FilesystemStore {
220220 }
221221 }
222222
223- if let Ok ( relative_path) = p. strip_prefix ( prefixed_dest. clone ( ) ) {
223+ if let Ok ( relative_path) = p. strip_prefix ( & prefixed_dest) {
224224 keys. push ( relative_path. display ( ) . to_string ( ) )
225225 }
226226 }
You can’t perform that action at this time.
0 commit comments