mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-23 16:44:18 +02:00
Have expand_home take Path over PathBuf
PathBuf isn't really needed because we neither need ownership nor mutation of the input path.
This commit is contained in:
parent
04d41fdbf2
commit
ba1f8ac239
1 changed files with 1 additions and 1 deletions
|
|
@ -654,7 +654,7 @@ impl<'a> Config<'a> {
|
|||
}
|
||||
|
||||
/// Expands tilde (~) prefixed directories into its absolute version
|
||||
fn expand_home<'a>(input_path: &'a PathBuf, home_path: Option<&PathBuf>) -> Result<Cow<'a, Path>> {
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue