add missed RocRefcounted

This commit is contained in:
Brendan Hansknecht 2024-07-13 09:43:27 -07:00
parent 3198ed5c8e
commit 0533578562
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -106,7 +106,10 @@ where
}
}
impl<T: FromWasm32Memory + Clone> FromWasm32Memory for RocBox<T> {
impl<T: FromWasm32Memory + Clone> FromWasm32Memory for RocBox<T>
where
T: RocRefcounted,
{
fn decode(memory: &[u8], offset: u32) -> Self {
let ptr = <u32 as FromWasm32Memory>::decode(memory, offset + 4 * Builtin::WRAPPER_PTR);
debug_assert_ne!(ptr, 0);