Skip to content

Commit

Permalink
Fix clippy warnings with all features enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
chifflier committed Nov 30, 2020
1 parent c6f305c commit b975f25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/mpint.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use std::convert::From;
use std::ops::{AddAssign, Shl, Shr};

use nom::IResult;

use nom::*;
use num_bigint::{BigInt, BigUint, Sign};
use num_traits::identities::Zero;
use std::convert::From;
use std::ops::{AddAssign, Shl, Shr};

struct MpUint(BigUint);

Expand Down Expand Up @@ -37,7 +36,7 @@ impl From<u8> for MpUint {
}

pub fn parse_ssh_mpint(i: &[u8]) -> IResult<&[u8], BigInt> {
if i.len() == 0 {
if i.is_empty() {
Ok((i, BigInt::zero()))
} else {
do_parse! {
Expand Down
7 changes: 4 additions & 3 deletions src/serialize.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use cookie_factory::{set_be_u32, set_be_u8, GenError};
use crate::ssh::{
SshPacket, SshPacketDebug, SshPacketDhReply, SshPacketDisconnect, SshPacketKeyExchange,
};
use cookie_factory::*;
use std::iter::repeat;

use ssh::{SshPacket, SshPacketDebug, SshPacketDhReply, SshPacketDisconnect, SshPacketKeyExchange};

fn gen_string<'a, 'b>(
x: (&'a mut [u8], usize),
s: &'b [u8],
Expand Down

0 comments on commit b975f25

Please sign in to comment.