mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 06:28:11 +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>>)>,
|
fields: Vec<(usize, Vec<Box<dyn crate::list::AnyAttributeValue>>)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// SAFETY: the same argument as for `RecordValue`. The element bounds and the
|
// SAFETY: as for `RecordValue`.
|
||||||
// parking discipline make the record bytes thread-safe, and their validity
|
|
||||||
// is tied to the shared arena.
|
|
||||||
unsafe impl Send for GroupItem<'_> {}
|
unsafe impl Send for GroupItem<'_> {}
|
||||||
// SAFETY: as `Send`.
|
// SAFETY: as `Send`.
|
||||||
unsafe impl Sync for GroupItem<'_> {}
|
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>>>>(),
|
size_of::<Option<&'a List<Graphic<'a>>>>(),
|
||||||
"the paint value form must span the marker's value"
|
"the paint value form must span the marker's value"
|
||||||
);
|
);
|
||||||
// SAFETY: the census admits one value type per attribute name and panics on
|
// 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.
|
||||||
// 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.
|
|
||||||
Some(unsafe { std::mem::transmute_copy::<Option<&'a List<Graphic>>, A::Value<'a>>(&Some(slot)) })
|
Some(unsafe { std::mem::transmute_copy::<Option<&'a List<Graphic>>, A::Value<'a>>(&Some(slot)) })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user