diff options
Diffstat (limited to 'rust/qemu-api/tests/tests.rs')
-rw-r--r-- | rust/qemu-api/tests/tests.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 278efe9..ed3a555 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -26,11 +26,6 @@ fn test_device_decl_macros() { pub migrate_clock: bool, } - #[repr(C)] - pub struct DummyClass { - pub _parent: DeviceClass, - } - declare_properties! { DUMMY_PROPERTIES, define_property!( @@ -43,7 +38,7 @@ fn test_device_decl_macros() { } unsafe impl ObjectType for DummyState { - type Class = DummyClass; + type Class = <DeviceState as ObjectType>::Class; const TYPE_NAME: &'static CStr = c_str!("dummy"); } @@ -61,8 +56,6 @@ fn test_device_decl_macros() { } } - impl_device_class!(DummyState); - unsafe { module_call_init(module_init_type::MODULE_INIT_QOM); object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast()); |