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

View File

@@ -16,10 +16,6 @@ impl<'i, const N: u32> Node<'i, ()> for IntNode<N> {
#[derive(Default, Debug)]
pub struct ValueNode<T>(pub T);
impl<T: StaticTypeSized> StaticType for ValueNode<T> {
type Static = ValueNode<T::Static>;
}
impl<'i, T: 'i> Node<'i, ()> for ValueNode<T> {
type Output = &'i T;
fn eval<'s: 'i>(&'s self, _input: ()) -> Self::Output {
@@ -48,13 +44,6 @@ impl<T: Clone + Copy> Copy for ValueNode<T> {}
#[derive(Clone)]
pub struct ClonedNode<T: Clone>(pub T);
impl<T: Clone + StaticTypeSized> StaticType for ClonedNode<T>
where
T::Static: Clone,
{
type Static = ClonedNode<T::Static>;
}
impl<'i, T: Clone + 'i> Node<'i, ()> for ClonedNode<T> {
type Output = T;
fn eval<'s: 'i>(&'s self, _input: ()) -> Self::Output {