summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue_4031.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue_4031.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue_4031.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue_4031.rs b/src/tools/rustfmt/tests/target/issue_4031.rs
new file mode 100644
index 000000000..065d5395c
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue_4031.rs
@@ -0,0 +1,21 @@
+fn foo() {
+ with_woff2_glyf_table("tests/fonts/woff2/SFNT-TTF-Composite.woff2", |glyf| {
+ let actual = glyf
+ .records
+ .iter()
+ .map(|glyph| match glyph {
+ GlyfRecord::Parsed(
+ found @ Glyph {
+ data: GlyphData::Composite { .. },
+ ..
+ },
+ ) => Some(found),
+ _ => None,
+ })
+ .find(|candidate| candidate.is_some())
+ .unwrap()
+ .unwrap();
+
+ assert_eq!(*actual, expected)
+ });
+}