mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
clippy: fix warnings in components/gfx (#31560)
* clippy: fix warnings in components/gfx * refactor: switched the order of impl so that its intent is clearer * fix: add font context default in other platforms
This commit is contained in:
parent
1771f9a9a1
commit
88033bd654
17 changed files with 195 additions and 234 deletions
|
@ -34,13 +34,13 @@ struct TestFontSource {
|
|||
|
||||
impl TestFontSource {
|
||||
fn new() -> TestFontSource {
|
||||
let mut csstest_ascii = FontTemplates::new();
|
||||
let mut csstest_ascii = FontTemplates::default();
|
||||
Self::add_face(&mut csstest_ascii, "csstest-ascii", None);
|
||||
|
||||
let mut csstest_basic = FontTemplates::new();
|
||||
let mut csstest_basic = FontTemplates::default();
|
||||
Self::add_face(&mut csstest_basic, "csstest-basic-regular", None);
|
||||
|
||||
let mut fallback = FontTemplates::new();
|
||||
let mut fallback = FontTemplates::default();
|
||||
Self::add_face(&mut fallback, "csstest-basic-regular", Some("fallback"));
|
||||
|
||||
let mut families = HashMap::new();
|
||||
|
@ -49,7 +49,7 @@ impl TestFontSource {
|
|||
families.insert(fallback_font_families(None)[0].to_owned(), fallback);
|
||||
|
||||
TestFontSource {
|
||||
handle: FontContextHandle::new(),
|
||||
handle: FontContextHandle::default(),
|
||||
families,
|
||||
find_font_count: Rc::new(Cell::new(0)),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue