Skip to content

Commit

Permalink
Shorten closure
Browse files Browse the repository at this point in the history
  • Loading branch information
madig authored and cmyr committed Mar 11, 2024
1 parent 6e0ea27 commit 18a1f8e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,7 @@ impl LayerContents {
where
F: FnMut(&Layer) -> bool,
{
self.layers.retain(|layer| {
if layer.is_default() {
return true;
}
predicate(layer)
});
self.layers.retain(|layer| layer.is_default() || predicate(layer));
}

/// Removes any layers that contain no glyphs
Expand Down

0 comments on commit 18a1f8e

Please sign in to comment.