1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-02-14 17:08:37 +00:00

Fix clippy::redundant_closure warnings

This commit is contained in:
einfachIrgendwer0815 2025-01-30 18:16:03 +01:00
parent 3d0f0c0565
commit f0e2f642e0
No known key found for this signature in database
GPG Key ID: 58D55E5F117DA873

View File

@ -225,7 +225,7 @@ impl FromStr for StyleComponentList {
fn from_str(s: &str) -> Result<Self> {
Ok(StyleComponentList(
s.split(",")
.map(|s| ComponentAction::extract_from_str(s)) // If the component starts with "-", it's meant to be removed
.map(ComponentAction::extract_from_str) // If the component starts with "-", it's meant to be removed
.map(|(a, s)| Ok((a, StyleComponent::from_str(s)?)))
.collect::<Result<Vec<(ComponentAction, StyleComponent)>>>()?,
))