Skip to content

Commit e80d4b7

Browse files
committed
replace map + flatten with and_then
1 parent 5abe9b5 commit e80d4b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plotters/src/style/font/ab_glyph.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ impl FontData for FontDataInternal {
8989
.read()
9090
.unwrap()
9191
.get(family.as_str())
92-
.map(|fam| fam.get_fallback(style))
93-
.flatten()
92+
.and_then(|fam| fam.get_fallback(style))
9493
.ok_or(FontError::FontUnavailable)?
9594
.clone(),
9695
})

0 commit comments

Comments
 (0)