safety comment formatting

This commit is contained in:
2025-09-25 00:35:20 -04:00
parent 055aaf757c
commit 6e5cce2617
2 changed files with 5 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ impl Widgets {
/// get_dyn but dynamic borrow checking of widgets
/// lets you do recursive (tree) operations, like the painter does
pub fn get_dyn_dynamic(&self, id: &Id) -> WidgetWrapper<'_> {
// must guarantee no other mutable references to this widget exist
// SAFETY: must guarantee no other mutable references to this widget exist
// done through the borrow variable
let data: &mut WidgetData = unsafe { std::mem::transmute(self.map.get(id)) };
if data.borrowed {