diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-13 12:37:43 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-25 16:18:12 +0100 |
| commit | d556226d6965738e06a1d75faaf271b769bb5880 (patch) | |
| tree | e242a3f8d66528eda3ceaa54ba5f91df76ef7d77 /rust/qemu-api/tests/tests.rs | |
| parent | 567c0c41a6700be72eb9e040ba0b8d7bf0cc5919 (diff) | |
| download | focaccia-qemu-d556226d6965738e06a1d75faaf271b769bb5880.tar.gz focaccia-qemu-d556226d6965738e06a1d75faaf271b769bb5880.zip | |
rust: qom: get rid of ClassInitImpl
Complete the conversion from the ClassInitImpl trait to class_init() methods. This will provide more freedom to split the qemu_api crate in separate parts. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/tests/tests.rs')
| -rw-r--r-- | rust/qemu-api/tests/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 93c5637bbc..e3985782a3 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -14,7 +14,7 @@ use qemu_api::{ declare_properties, define_property, prelude::*, qdev::{DeviceImpl, DeviceState, Property, ResettablePhasesImpl}, - qom::{ClassInitImpl, ObjectImpl, ParentField}, + qom::{ObjectImpl, ParentField}, sysbus::SysBusDevice, vmstate::VMStateDescription, zeroable::Zeroable, @@ -43,7 +43,7 @@ pub struct DummyClass { impl DummyClass { pub fn class_init<T: DeviceImpl>(self: &mut DummyClass) { - <T as ClassInitImpl<DeviceClass>>::class_init(&mut self.parent_class); + self.parent_class.class_init::<T>(); } } |