From 335984ee28a3b6a928d3cda6354c9b1d0a061093 Mon Sep 17 00:00:00 2001 From: BlockListed <44610569+BlockListed@users.noreply.github.com> Date: Sat, 9 Sep 2023 18:53:45 +0200 Subject: [PATCH] cargo clippy and cargo fmt --- src/config.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4e4a9663..5c4a9616 100644 --- a/src/config.rs +++ b/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 }