mirror of https://github.com/astral-sh/uv
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
|
|
@ -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…
Reference in New Issue