Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Sep 18, 2021
1 parent f6e1468 commit 37fd83a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crc-any"
version = "2.3.12"
version = "2.4.0"
authors = ["Magic Len <[email protected]>"]
edition = "2018"
repository = "https://github.com/magiclen/crc-any"
Expand All @@ -19,7 +19,7 @@ version = "0.3"
optional = true

[dependencies.heapless]
version = "0.5"
version = "0.7"
optional = true

[dev-dependencies]
Expand Down
6 changes: 2 additions & 4 deletions src/crc_u16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use alloc::fmt::{self, Debug, Display, Formatter};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;

#[cfg(feature = "heapless")]
use heapless::consts::U2;
#[cfg(feature = "heapless")]
use heapless::Vec as HeaplessVec;

Expand Down Expand Up @@ -314,7 +312,7 @@ impl CRCu16 {
impl CRCu16 {
/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, U2> {
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, 2> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand All @@ -328,7 +326,7 @@ impl CRCu16 {

/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, U2> {
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, 2> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand Down
6 changes: 2 additions & 4 deletions src/crc_u32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use alloc::fmt::{self, Debug, Display, Formatter};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;

#[cfg(feature = "heapless")]
use heapless::consts::U4;
#[cfg(feature = "heapless")]
use heapless::Vec as HeaplessVec;

Expand Down Expand Up @@ -314,7 +312,7 @@ impl CRCu32 {
impl CRCu32 {
/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, U4> {
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, 4> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand All @@ -328,7 +326,7 @@ impl CRCu32 {

/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, U4> {
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, 4> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand Down
6 changes: 2 additions & 4 deletions src/crc_u64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use alloc::fmt::{self, Debug, Display, Formatter};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;

#[cfg(feature = "heapless")]
use heapless::consts::U8;
#[cfg(feature = "heapless")]
use heapless::Vec as HeaplessVec;

Expand Down Expand Up @@ -314,7 +312,7 @@ impl CRCu64 {
impl CRCu64 {
/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, U8> {
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, 8> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand All @@ -328,7 +326,7 @@ impl CRCu64 {

/// Get the current CRC value (it always returns a heapless vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
#[inline]
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, U8> {
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, 8> {
let crc = self.get_crc();

let e = (self.bits as usize + 7) >> 3;
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ use alloc::fmt::{self, Display, Formatter};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;

#[cfg(feature = "heapless")]
use heapless::consts::U8;
#[cfg(feature = "heapless")]
use heapless::Vec as HeaplessVec;

Expand Down Expand Up @@ -316,7 +314,7 @@ impl CRC {
#[cfg(feature = "heapless")]
impl CRC {
/// Get the current CRC value (it always returns a vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, U8> {
pub fn get_crc_heapless_vec_le(&mut self) -> HeaplessVec<u8, 8> {
let mut vec = HeaplessVec::new();

let bits = match self {
Expand All @@ -342,7 +340,7 @@ impl CRC {
}

/// Get the current CRC value (it always returns a vec instance with a length corresponding to the CRC bits). You can continue calling `digest` method even after getting a CRC value.
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, U8> {
pub fn get_crc_heapless_vec_be(&mut self) -> HeaplessVec<u8, 8> {
let mut vec = HeaplessVec::new();

let bits = match self {
Expand Down

0 comments on commit 37fd83a

Please sign in to comment.