From 3a2d68f0591a8cd0eda6f53dee7d50d8d8b5146a Mon Sep 17 00:00:00 2001 From: Ellis Clayton Date: Sat, 2 May 2026 09:00:13 +1000 Subject: [PATCH] Remove short circuit It wasn't really much of an optimization because .is_absolute() still calls .components() under the hood and does similar comparisons to the tilde checking below. --- src/config.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 95ef7a6..c836c95 100644 --- a/src/config.rs +++ b/src/config.rs @@ -655,10 +655,6 @@ impl<'a> Config<'a> { /// Expands tilde (~) prefixed directories into its absolute version fn expand_home<'a>(input_path: &'a Path, home_path: Option<&PathBuf>) -> Result> { - if input_path.is_absolute() { - return Ok(Cow::Borrowed(input_path)); - } - let mut components = input_path.components(); if let Some(Component::Normal(first_component_raw)) = components.next() {