Fix clippy::manual_retain
This commit is contained in:
parent
faf00d1047
commit
0183ea548a
@ -45,7 +45,7 @@ pub fn find_related_assets(path: &Path, config: &Config, recursive: bool) -> Vec
|
||||
}
|
||||
|
||||
if let Some(ref globset) = config.ignored_content_globset {
|
||||
assets = assets.into_iter().filter(|p| !globset.is_match(p)).collect();
|
||||
assets.retain(|p| !globset.is_match(p));
|
||||
}
|
||||
|
||||
assets
|
||||
|
||||
@ -482,13 +482,10 @@ pub fn markdown_to_html(
|
||||
}
|
||||
|
||||
// We remove all the empty things we might have pushed before so we don't get some random \n
|
||||
events = events
|
||||
.into_iter()
|
||||
.filter(|e| match e {
|
||||
Event::Text(text) | Event::Html(text) => !text.is_empty(),
|
||||
_ => true,
|
||||
})
|
||||
.collect();
|
||||
events.retain(|e| match e {
|
||||
Event::Text(text) | Event::Html(text) => !text.is_empty(),
|
||||
_ => true,
|
||||
});
|
||||
|
||||
let heading_refs = get_heading_refs(&events);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user