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.
This commit is contained in:
Ellis Clayton 2026-05-02 09:00:13 +10:00
commit 3a2d68f059
No known key found for this signature in database
GPG key ID: A2A2BF86BEB49FC6

View file

@ -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<Cow<'a, Path>> {
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() {