1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-10 13:09:07 +00:00

cargo clippy and cargo fmt

This commit is contained in:
BlockListed 2023-09-09 18:53:45 +02:00
commit 335984ee28
No known key found for this signature in database
GPG key ID: 2D204777C477B588

View file

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