summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue_4031.rs
blob: 065d5395c7e73ad161d330877ec4445ed32951f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
    });
}