Re: [PATCH v17 1/6] rust: drm: gem: shmem: Fix Default implementation for ObjectConfig
From: Alice Ryhl
Date: Thu Jun 04 2026 - 07:57:56 EST
On Wed, Jun 03, 2026 at 03:42:30PM -0400, Lyude Paul wrote:
> I completely forgot when coming up with this type that #[derive(Default)]
> only works if all generics mentioned in the type implement Default (and T
> usually doesn't). This being said: We don't use `T` for anything besides
> using it for a reference type, so whether or not it implements `Default`
> shouldn't actually need to matter.
>
> So, fix this by just manually implementing Default instead of deriving it.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
This one is so simple I went ahead and applied it to drm-rust-next right
away.
Alice