clippy: Fix warnings in components/shared (#31627)

* clippy: fix warnings in `components/shared`

* fix: formatting derive

* fix: rename new to default
This commit is contained in:
eri 2024-03-12 18:22:05 +01:00 committed by GitHub
parent 4efebf1e62
commit 21939c2ba8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 36 additions and 50 deletions

View file

@ -199,11 +199,11 @@ pub struct PendingRestyle {
pub damage: RestyleDamage,
}
impl PendingRestyle {
impl Default for PendingRestyle {
/// Creates a new empty pending restyle.
#[inline]
pub fn new() -> Self {
PendingRestyle {
fn default() -> Self {
Self {
snapshot: None,
hint: RestyleHint::empty(),
damage: RestyleDamage::empty(),