Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-16 04:12:53 +01:00
cargo clippy and cargo fmt
Dieser Commit ist enthalten in:
Ursprung
298cf8adcb
Commit
335984ee28
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren