chore: fix new lint warnings (#400)

This commit is contained in:
Santiago Carmuega 2024-02-11 17:56:22 -03:00 committed by GitHub
parent 78414b6ce8
commit 3dd00ad3cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 163 additions and 182 deletions

View file

@ -170,7 +170,7 @@ impl<'b> Decoder<'b> {
#[cfg(feature = "num-bigint")]
pub fn big_word(&mut self) -> Result<BigUint, Error> {
let mut leading_bit = 1;
let mut final_word: BigUint = (0 as u8).into();
let mut final_word: BigUint = (0_u8).into();
let mut shl: u128 = 0;
// continue looping if lead bit is 1 which is 128 as a u8 otherwise exit
while leading_bit > 0 {

View file

@ -42,7 +42,7 @@ impl Decode<'_> for isize {
#[cfg(feature = "num-bigint")]
impl Decode<'_> for BigInt {
fn decode(d: &mut Decoder) -> Result<Self, Error> {
Ok(d.big_integer()?.into())
d.big_integer()
}
}

View file

@ -183,7 +183,7 @@ impl Encoder {
#[cfg(feature = "num-bigint")]
pub fn big_word(&mut self, c: BigUint) -> &mut Self {
let mut d = c;
let zero = (0 as u8).into();
let zero = (0_u8).into();
loop {
let m: usize = 127;
let mut w = (d.clone() & <usize as Into<BigUint>>::into(m))