mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 10:33:49 +00:00
uv-cli: use PathBuf::from
Conversions from strings to paths are always infallible.
This commit is contained in:
parent
9348564580
commit
d6a14464ab
1 changed files with 1 additions and 4 deletions
|
@ -731,10 +731,7 @@ fn parse_file_path(input: &str) -> Result<PathBuf, String> {
|
|||
url.to_file_path()
|
||||
.map_err(|()| "invalid file URL".to_string())
|
||||
} else {
|
||||
match PathBuf::from_str(input) {
|
||||
Ok(path) => Ok(path),
|
||||
Err(err) => Err(err.to_string()),
|
||||
}
|
||||
Ok(PathBuf::from(input))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue