mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
clippy: Fix default_constructed_unit_structs
warnings in components
(#31827)
* clippy: Fix default constructed unit structs warnings * refactor: Allow default constructed unit structs to avoid gfx build error
This commit is contained in:
parent
0a771169b8
commit
1ab38fcd3f
3 changed files with 5 additions and 3 deletions
|
@ -491,6 +491,7 @@ impl FontCacheThread {
|
|||
// TODO: Allow users to specify these.
|
||||
let generic_fonts = populate_generic_fonts();
|
||||
|
||||
#[allow(clippy::default_constructed_unit_structs)]
|
||||
let mut cache = FontCache {
|
||||
port,
|
||||
channel_to_self,
|
||||
|
|
|
@ -65,6 +65,7 @@ pub struct FontContext<S: FontSource> {
|
|||
|
||||
impl<S: FontSource> FontContext<S> {
|
||||
pub fn new(font_source: S) -> FontContext<S> {
|
||||
#[allow(clippy::default_constructed_unit_structs)]
|
||||
let handle = FontContextHandle::default();
|
||||
FontContext {
|
||||
platform_handle: handle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue