From a8a6b0d5151a13df44ac9c8ab64b6439b7d4b5a3 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sun, 14 Jan 2024 14:09:33 -0800 Subject: [PATCH] Oops, PopGuard::pop was supposed to move Signed-off-by: Alex Saveau --- src/core/files.rs | 2 +- src/utils/fast_path.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/files.rs b/src/core/files.rs index f0b6b32..92b4003 100644 --- a/src/core/files.rs +++ b/src/core/files.rs @@ -53,7 +53,7 @@ pub fn create_files_and_dirs( #[cfg_attr(feature = "tracing", tracing::instrument(level = "trace"))] fn create_dirs(num_dirs: usize, dir: &mut FastPathBuf) -> Result<(), io::Error> { for i in 0..num_dirs { - let mut dir = with_dir_name(i, |s| dir.push(s)); + let dir = with_dir_name(i, |s| dir.push(s)); create_dir_all(&dir) .attach_printable_lazy(|| format!("Failed to create directory {dir:?}"))?; diff --git a/src/utils/fast_path.rs b/src/utils/fast_path.rs index 2b5f52a..603fbdb 100644 --- a/src/utils/fast_path.rs +++ b/src/utils/fast_path.rs @@ -158,7 +158,7 @@ impl<'a> PopGuard<'a> { Self(path) } - pub fn pop(&mut self) { + pub fn pop(self) { unsafe { self.0.pop() } } }