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

@@ -456,7 +456,7 @@ pub struct ImageSlice<'a, Pixel> {
pub data: &'a (),
}
impl<P: StaticTypeSized> StaticType for ImageSlice<'_, P> {
unsafe impl<P: StaticTypeSized> StaticType for ImageSlice<'_, P> {
type Static = ImageSlice<'static, P::Static>;
}
@@ -585,7 +585,7 @@ mod image {
pub data: Vec<P>,
}
impl<P: StaticTypeSized + Pixel> StaticType for Image<P>
unsafe impl<P: StaticTypeSized + Pixel> StaticType for Image<P>
where
P::Static: Pixel,
{
@@ -770,7 +770,7 @@ mod image {
}
}
impl<P: StaticTypeSized + Pixel> StaticType for ImageFrame<P>
unsafe impl<P: StaticTypeSized + Pixel> StaticType for ImageFrame<P>
where
P::Static: Pixel,
{