mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Condense the multi-line safety notes to one line
This commit is contained in:
@@ -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<'_> {}
|
||||
|
||||
@@ -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)) })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user