From 753eedb3a76ddf3dcff807ad0e5d1bd288fdb1ec Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Fri, 3 May 2024 14:06:29 -0700 Subject: [PATCH] perf: Drop `normalized_components` slightly sooner when not using it --- src/spec.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spec.rs b/src/spec.rs index a80c489e..7ed4f6b4 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -250,6 +250,7 @@ pub(crate) fn path_to_string>(path: T) -> String { if recreate { normalized_components.join("/") } else { + drop(normalized_components); let original = original.unwrap(); if !original.starts_with('/') { let mut slash_original = String::with_capacity(original.len() + 1);