From 17fbbf98e151575ca297d7ff97fff2fce45c7f44 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 14 Jul 2026 15:09:38 +0800 Subject: [PATCH] render: derive Default for BlackHoleMaterial Clippy warned that the manual Default implementation for BlackHoleMaterial could be derived (clippy::derivable_impls). We now derive Default directly on the struct and remove the manual implementation block. --- src/render/material.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/render/material.rs b/src/render/material.rs index 9d1bc24..ca4ca79 100644 --- a/src/render/material.rs +++ b/src/render/material.rs @@ -89,7 +89,7 @@ pub struct SphereData { pub const MAX_PLANETS: usize = 32; -#[derive(Asset, TypePath, AsBindGroup, Clone)] +#[derive(Asset, TypePath, AsBindGroup, Clone, Default)] pub struct BlackHoleMaterial { #[uniform(0)] pub uniforms: BlackHoleUniforms, @@ -130,12 +130,4 @@ impl Material2d for UpscaleMaterial { } } -impl Default for BlackHoleMaterial { - fn default() -> Self { - Self { - uniforms: BlackHoleUniforms::default(), - skybox: None, - planets: Handle::default(), - } - } -} +