Skip to content

Commit 971c63f

Browse files
committed
f Use String::new
1 parent 85e65c4 commit 971c63f

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
@@ -429,8 +429,8 @@ impl MigratableKVStore for FilesystemStore {
429429
let primary_path = primary_entry.path();
430430

431431
if dir_entry_is_key(&primary_path)? {
432-
let primary_namespace = "".to_string();
433-
let secondary_namespace = "".to_string();
432+
let primary_namespace = String::new();
433+
let secondary_namespace = String::new();
434434
let key = get_key_from_dir_entry(&primary_path, prefixed_dest)?;
435435
keys.push((primary_namespace, secondary_namespace, key));
436436
continue 'primary_loop;
@@ -443,7 +443,7 @@ impl MigratableKVStore for FilesystemStore {
443443

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

0 commit comments

Comments
 (0)