From 239116db686d6cea43f4a1d3f6174d13254cbf93 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:45:44 +1100 Subject: [PATCH] Update create_if_not_exist usage in mod binstall_crates_v1 Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/binstalk-manifests/src/binstall_crates_v1.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/binstalk-manifests/src/binstall_crates_v1.rs b/crates/binstalk-manifests/src/binstall_crates_v1.rs index e0234f77..e9282d61 100644 --- a/crates/binstalk-manifests/src/binstall_crates_v1.rs +++ b/crates/binstalk-manifests/src/binstall_crates_v1.rs @@ -43,7 +43,8 @@ where Iter: IntoIterator, Data: From, { - let mut file = FileLock::new_exclusive(create_if_not_exist(path.as_ref())?)?; + let path = path.as_ref(); + let mut file = create_if_not_exist(path)?; // Move the cursor to EOF file.seek(io::SeekFrom::End(0))?; @@ -166,7 +167,7 @@ impl Records { pub fn load_from_path(path: impl AsRef) -> Result { let mut this = Self { - file: FileLock::new_exclusive(create_if_not_exist(path.as_ref())?)?, + file: create_if_not_exist(path.as_ref())?, data: BTreeSet::default(), }; this.load_impl()?;