mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Janitor: Fix clippy::missing_safety_doc
This commit is contained in:
parent
9dcd107e84
commit
cbdea7c9c7
2 changed files with 8 additions and 1 deletions
|
@ -1022,10 +1022,16 @@ impl core::ops::Deref for FlickableDataBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// # Safety
|
||||||
|
/// This must be called using a non-null pointer pointing to a chunk of memory big enough to
|
||||||
|
/// hold a FlickableDataBox
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn sixtyfps_flickable_data_init(data: *mut FlickableDataBox) {
|
pub unsafe extern "C" fn sixtyfps_flickable_data_init(data: *mut FlickableDataBox) {
|
||||||
std::ptr::write(data, FlickableDataBox::default());
|
std::ptr::write(data, FlickableDataBox::default());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// # Safety
|
||||||
|
/// This must be called using a non-null pointer pointing to an initialized FlickableDataBox
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn sixtyfps_flickable_data_free(data: *mut FlickableDataBox) {
|
pub unsafe extern "C" fn sixtyfps_flickable_data_free(data: *mut FlickableDataBox) {
|
||||||
std::ptr::drop_in_place(data);
|
std::ptr::drop_in_place(data);
|
||||||
|
|
|
@ -99,7 +99,8 @@ pub trait PropertyInfo<Item, Value> {
|
||||||
|
|
||||||
/// Calls Property::link_two_ways with the property represented here and the property pointer
|
/// Calls Property::link_two_ways with the property represented here and the property pointer
|
||||||
///
|
///
|
||||||
/// Safety: the property2 must be a pinned pointer to a Property of the same type
|
/// # Safety
|
||||||
|
/// the property2 must be a pinned pointer to a Property of the same type
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn link_two_ways(&self, item: Pin<&Item>, property2: *const ());
|
unsafe fn link_two_ways(&self, item: Pin<&Item>, property2: *const ());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue