Skip to content

Commit 770e810

Browse files
committed
f Use String::new
1 parent d26fb2f commit 770e810

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning-persister/src/fs_store.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ impl MigratableKVStore for FilesystemStore {
433433
let primary_path = primary_entry.path();
434434

435435
if dir_entry_is_key(&primary_path)? {
436-
let primary_namespace = "".to_string();
437-
let secondary_namespace = "".to_string();
436+
let primary_namespace = String::new();
437+
let secondary_namespace = String::new();
438438
let key = get_key_from_dir_entry(&primary_path, prefixed_dest)?;
439439
keys.push((primary_namespace, secondary_namespace, key));
440440
continue 'primary_loop;
@@ -447,7 +447,7 @@ impl MigratableKVStore for FilesystemStore {
447447

448448
if dir_entry_is_key(&secondary_path)? {
449449
let primary_namespace = get_key_from_dir_entry(&primary_path, prefixed_dest)?;
450-
let secondary_namespace = "".to_string();
450+
let secondary_namespace = String::new();
451451
let key = get_key_from_dir_entry(&secondary_path, &primary_path)?;
452452
keys.push((primary_namespace, secondary_namespace, key));
453453
continue 'secondary_loop;

0 commit comments

Comments
 (0)