On Thu, May 01, 2025 at 02:33:19PM -0400, Lyude Paul wrote: > Currently we are requiring AlwaysRefCounted in most trait bounds for gem > objects, and implementing it by hand for our only current type of gem > object. However, all gem objects use the same functions for reference > counting - and all gem objects support reference counting. > > We're planning on adding support for shmem gem objects, let's move this > around a bit by instead making IntoGEMObject require AlwaysRefCounted as a > trait bound, and then provide a blanket AlwaysRefCounted implementation for > any object that implements IntoGEMObject so all gem object types can use > the same AlwaysRefCounted implementation. This also makes things less > verbose by making the AlwaysRefCounted trait bound implicit for any > IntoGEMObject bound. > > Signed-off-by: Lyude Paul <ly...@redhat.com>
Great idea! Reviewed-by: Danilo Krummrich <d...@kernel.org>