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:
Ellis Clayton 2026-04-30 19:08:40 +10:00
commit ba1f8ac239
No known key found for this signature in database
GPG key ID: A2A2BF86BEB49FC6

View file

@ -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));
}