Browse Source

cargo clippy and cargo fmt

pull/3870/merge^2
BlockListed 2 years ago
parent
commit
335984ee28
No known key found for this signature in database GPG Key ID: 2D204777C477B588
  1. 9
      src/config.rs

9
src/config.rs

@ -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
}

Loading…
Cancel
Save