diff --git a/ni-fpga/Cargo.toml b/ni-fpga/Cargo.toml index 8e06bfd..470ca26 100644 --- a/ni-fpga/Cargo.toml +++ b/ni-fpga/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ni-fpga" -version = "1.4.1" +version = "1.5.0" authors = ["Connor Worley "] edition = "2018" license = "MIT" @@ -10,6 +10,6 @@ readme = "README.md" repository = "https://github.com/first-rust-competition/ni-fpga-rs" [dependencies] -bitvec = "0.17.4" +bitvec = "1.0.1" ni-fpga-sys = { version = "1.0.1", path = "../ni-fpga-sys" } -thiserror = "1.0.19" +thiserror = "1.0.35" diff --git a/ni-fpga/src/datatype.rs b/ni-fpga/src/datatype.rs index 4426535..571db3d 100644 --- a/ni-fpga/src/datatype.rs +++ b/ni-fpga/src/datatype.rs @@ -3,9 +3,9 @@ use bitvec::prelude::*; use crate::errors::Error; #[cfg(target_endian = "little")] -pub type FpgaBits = BitSlice; +pub type FpgaBits = BitSlice; #[cfg(target_endian = "big")] -pub type FpgaBits = BitSlice; +pub type FpgaBits = BitSlice; pub trait Datatype: Sized { const SIZE_IN_BITS: usize; @@ -20,7 +20,7 @@ impl Datatype for [T; N] { fn pack(fpga_bits: &mut FpgaBits, data: &Self) -> Result<(), Error> { data.iter() - .zip(fpga_bits.chunks_mut(T::SIZE_IN_BITS)) + .zip(unsafe { fpga_bits.chunks_mut(T::SIZE_IN_BITS).remove_alias() }) .try_for_each(|(src, bits)| Datatype::pack(bits, src)) }