mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-09-26 12:28:55 +02:00
cargo clippy and cargo fmt
This commit is contained in:
parent
298cf8adcb
commit
335984ee28
1 changed files with 5 additions and 4 deletions
|
@ -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…
Reference in a new issue