Condense the multi-line safety notes to one line

This commit is contained in:
Dennis Kobert
2026-09-06 16:00:05 +00:00
parent fbdba0e545
commit e52af0cee0
2 changed files with 2 additions and 7 deletions

View File

@@ -151,9 +151,7 @@ struct OwnedLanes {
fields: Vec<(usize, Vec<Box<dyn crate::list::AnyAttributeValue>>)>,
}
// SAFETY: the same argument as for `RecordValue`. The element bounds and the
// parking discipline make the record bytes thread-safe, and their validity
// is tied to the shared arena.
// SAFETY: as for `RecordValue`.
unsafe impl Send for GroupItem<'_> {}
// SAFETY: as `Send`.
unsafe impl Sync for GroupItem<'_> {}

View File

@@ -183,10 +183,7 @@ fn forced_paint<'a, A: Attribute>(paint: LanePaint<'a>) -> Option<A::Value<'a>>
size_of::<Option<&'a List<Graphic<'a>>>>(),
"the paint value form must span the marker's value"
);
// SAFETY: the census admits one value type per attribute name and panics on
// a conflict at registration, and the asserts above re-check it, so a marker
// named `fill` or `stroke` carries this crate's `Option<&List<Graphic>>`
// value form at the same size.
// SAFETY: the census admits one value type per attribute name, so a `fill` or `stroke` marker carries this crate's `Option<&List<Graphic>>` at the asserted size.
Some(unsafe { std::mem::transmute_copy::<Option<&'a List<Graphic>>, A::Value<'a>>(&Some(slot)) })
}