Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Nov 6, 2024
1 parent 36f9cf7 commit 6172936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/bytes.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::mem::size_of;

use anyhow::{anyhow, Result};
use bytemuck::{NoUninit, Pod};
use bytemuck::{NoUninit, Pod as PodTrait};
use bytemuck_derive::{Pod, Zeroable};

#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroable, Pod)]
Expand All @@ -12,7 +12,7 @@ pub fn clone_vec_as_bytes<T: NoUninit>(input: &[T]) -> Vec<u8> {
bytemuck::cast_slice(input).to_vec()
}

pub fn vec_from_bytes<T: Pod>(bytes: &[u8]) -> Vec<T> {
pub fn vec_from_bytes<T: PodTrait>(bytes: &[u8]) -> Vec<T> {
if bytes.len() % size_of::<T>() != 0 {
panic!(
"vecT: got {} bytes, needed multiple of {}",
Expand Down

0 comments on commit 6172936

Please sign in to comment.