Run clippy fix.

This commit is contained in:
Kavin 2024-03-11 09:10:10 +00:00
parent 407ee38e3a
commit e8169726b4
No known key found for this signature in database
GPG key ID: 6E4598CA5C92C41F

View file

@ -274,13 +274,11 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
let range = format!("{}-{}", start, end);
query.add_pair(("range", range));
}
} else {
if let Some(clen) = clen {
} else if let Some(clen) = clen {
let range = format!("0-{}", clen - 1);
query.add_pair(("range", range));
}
}
}
let range = query.get("range").map(|s| s.to_string());