mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Bump version of dyn-any to address missues which could lead to ub (#1145)
* Make StaticType trait unsafe * Mark StaticTypeSized and StaticTypeClone as unsafe as well * Update dyn-any dependency * Update manifest links
This commit is contained in:
@@ -42,7 +42,7 @@ impl<'n, T: 'n + dyn_any::StaticTypeSized> FixedSizeStack<T> {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.len.load(Ordering::SeqCst) == 0
|
||||
}
|
||||
pub fn push_fn<'a>(&self, f: impl FnOnce(&'a [T::Static]) -> T) {
|
||||
pub fn push_fn<'a>(&self, f: impl FnOnce(&'a [<T as StaticTypeSized>::Static]) -> T) {
|
||||
assert_eq!(std::mem::size_of::<T>(), std::mem::size_of::<T::Static>());
|
||||
unsafe { self.push(f(self.get())) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user