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:
Oluwatobi Sofela 2024-03-24 18:24:34 +01:00 committed by GitHub
parent 0a771169b8
commit 1ab38fcd3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View file

@ -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,