cargo clippy and cargo fmt

This commit is contained in:
BlockListed 2023-09-09 18:53:45 +02:00
parent 298cf8adcb
commit 335984ee28
No known key found for this signature in database
GPG Key ID: 2D204777C477B588
1 changed files with 5 additions and 4 deletions

View File

@ -1019,8 +1019,9 @@ pub fn extract_url_origin(url: &str) -> String {
}
// urls should be comma-seperated
fn extract_origins(urls: &str) -> String {
let mut origins = urls.split(',')
fn extract_origins(urls: &str) -> String {
let mut origins = urls
.split(',')
.map(extract_url_origin)
// TODO add itertools as dependency maybe
.fold(String::new(), |mut acc, origin| {
@ -1028,10 +1029,10 @@ fn extract_origins(urls: &str) -> String {
acc.push(',');
acc
});
// Pop trailing comma
origins.pop();
origins
}