♻️ Adapt linear gradient type so it can be used for radial too (wasm)

This commit is contained in:
Belén Albeza 2025-04-14 16:38:43 +02:00
parent f40ef26c69
commit abcd050c69
6 changed files with 32 additions and 28 deletions

View file

@ -20,7 +20,7 @@ pub extern "C" fn alloc_bytes(len: usize) -> *mut u8 {
if ptr.is_null() {
panic!("Allocation failed");
}
// TODO: Esto quizá se podría eliminar.
// TODO: Maybe this could be removed.
ptr::write_bytes(ptr, 0, len);
*guard = Some(Box::new(Vec::from_raw_parts(ptr, len, len)));
ptr