chore: fix new lint warnings (#400)
This commit is contained in:
parent
78414b6ce8
commit
3dd00ad3cd
10 changed files with 163 additions and 182 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue