mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Avoid panic for file url (#3306)
When using find links with a file url, we shouldn't panic because we can't remove username/password for a host-less url. See #3262
This commit is contained in:
parent
1344cfae4b
commit
cedb8259f7
1 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,8 @@ impl CanonicalUrl {
|
|||
}
|
||||
|
||||
// Strip credentials.
|
||||
url.set_password(None).unwrap();
|
||||
url.set_username("").unwrap();
|
||||
let _ = url.set_password(None);
|
||||
let _ = url.set_username("");
|
||||
|
||||
// Strip a trailing slash.
|
||||
if url.path().ends_with('/') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue