mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
567c0c41a6
commit
d556226d69
6 changed files with 101 additions and 130 deletions
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue