mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-21 23:54:18 +02:00
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:
parent
ba1f8ac239
commit
3a2d68f059
1 changed files with 0 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue