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:
Dennis Kobert
2023-04-17 23:35:04 +02:00
committed by GitHub
parent 50105c9a74
commit e3c38d5eba
14 changed files with 47 additions and 64 deletions
+1 -1
View File
@@ -16,5 +16,5 @@ documentation = "https://graphite.rs/libraries/bezier-rs/"
[dependencies]
glam = { version = "0.22", features = ["serde"] }
dyn-any = { version = "0.2.1", path = "../dyn-any", optional = true }
dyn-any = { version = "0.3.0", path = "../dyn-any", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
+2 -2
View File
@@ -33,7 +33,7 @@ enum BezierHandles {
}
#[cfg(feature = "dyn-any")]
impl dyn_any::StaticType for BezierHandles {
unsafe impl dyn_any::StaticType for BezierHandles {
type Static = BezierHandles;
}
@@ -63,6 +63,6 @@ impl Debug for Bezier {
}
#[cfg(feature = "dyn-any")]
impl dyn_any::StaticType for Bezier {
unsafe impl dyn_any::StaticType for Bezier {
type Static = Bezier;
}
+1 -1
View File
@@ -20,7 +20,7 @@ pub struct Subpath<ManipulatorGroupId: crate::Identifier> {
}
#[cfg(feature = "dyn-any")]
impl<ManipulatorGroupId: crate::Identifier> dyn_any::StaticType for Subpath<ManipulatorGroupId> {
unsafe impl<ManipulatorGroupId: crate::Identifier> dyn_any::StaticType for Subpath<ManipulatorGroupId> {
type Static = Subpath<ManipulatorGroupId>;
}
+1 -1
View File
@@ -46,7 +46,7 @@ impl<ManipulatorGroupId: crate::Identifier> Hash for ManipulatorGroup<Manipulato
}
#[cfg(feature = "dyn-any")]
impl<ManipulatorGroupId: crate::Identifier> dyn_any::StaticType for ManipulatorGroup<ManipulatorGroupId> {
unsafe impl<ManipulatorGroupId: crate::Identifier> dyn_any::StaticType for ManipulatorGroup<ManipulatorGroupId> {
type Static = ManipulatorGroup<ManipulatorGroupId>;
}