Fix a clippy warning

This commit is contained in:
messense 2022-03-30 10:18:13 +08:00
parent 548ea65072
commit 6db945c28f
No known key found for this signature in database
GPG key ID: BB41A8A2C716CCA9

View file

@ -6,7 +6,7 @@ pub struct Path(String);
impl Path {
pub fn from_url(url: &Url) -> Path {
let path = get_url_without_origin(&url);
let path = get_url_without_origin(url);
let path = percent_decode(path.as_bytes()).decode_utf8_lossy();
if path.is_empty() {
Path("/".into())