fixup: remove redundant unsafe scope

This commit is contained in:
Julius 2024-05-13 17:19:36 -07:00 committed by Jonathan Spira
parent 1d06e2c049
commit beccfa89ec

View File

@ -61,7 +61,7 @@ impl DrawData {
}
slice::from_raw_parts(
self.cmd_lists as *const *const DrawList,
self.cmd_lists_count as usize
self.cmd_lists_count as usize,
)
}
/// Converts all buffers from indexed to non-indexed, in case you cannot render indexed
@ -149,7 +149,6 @@ impl RawWrapper for DrawList {
impl DrawList {
#[inline]
pub(crate) unsafe fn cmd_buffer(&self) -> &[sys::ImDrawCmd] {
unsafe {
if self.0.CmdBuffer.Size <= 0 || self.0.CmdBuffer.Data.is_null() {
return &[];
}
@ -159,7 +158,6 @@ impl DrawList {
self.0.CmdBuffer.Size as usize,
)
}
}
#[inline]
pub fn idx_buffer(&self) -> &[DrawIdx] {