diff --git a/crates/ecstore/src/disk/local/commit.rs b/crates/ecstore/src/disk/local/commit.rs
index fb99f1a51b..c115ca37fe 100644
--- a/crates/ecstore/src/disk/local/commit.rs
+++ b/crates/ecstore/src/disk/local/commit.rs
@@ -907,8 +907,8 @@ impl LocalDisk {
.await?;
}
- check_path_length(src_file_path.to_string_lossy().to_string().as_str())?;
- check_path_length(dst_file_path.to_string_lossy().to_string().as_str())?;
+ check_path_length(src_file_path.to_string_lossy().as_ref())?;
+ check_path_length(dst_file_path.to_string_lossy().as_ref())?;
let src_file_parent = src_file_path
.parent()
diff --git a/crates/ecstore/src/set_disk/core/io_primitives.rs b/crates/ecstore/src/set_disk/core/io_primitives.rs
index da68cb0974..3bae0dc1b6 100644
--- a/crates/ecstore/src/set_disk/core/io_primitives.rs
+++ b/crates/ecstore/src/set_disk/core/io_primitives.rs
@@ -2854,9 +2854,9 @@ struct RenameDataObservations<'a> {
pub(in crate::set_disk) struct RenameDataCommit {
pub(in crate::set_disk) online_disks: Vec