Add some clippy checks
All checks were successful
timw4mail/rusty-numbers/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2021-03-11 15:38:37 -05:00
parent 67d3e7780b
commit eaec59f596
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#![allow(unused_variables)]
//! \[WIP\] Arbitrarily large integers
use crate::num::Sign::*;
use crate::num::*;
use crate::num::FracOp;
use crate::num::Sign::{self, Positive, Negative};
#[cfg(all(feature = "alloc", not(feature = "std")))]
extern crate alloc;
@ -423,7 +423,7 @@ impl Not for BigInt {
fn not(self) -> Self::Output {
let mut flipped: Vec<usize> = Vec::with_capacity(self.inner.len());
for val in self.inner.iter() {
for val in &self.inner {
let rev = !*val;
flipped.push(rev);
}
@ -529,7 +529,7 @@ macro_rules! impl_from_larger {
loop {
rem = quotient % target_radix;
quotient = quotient / target_radix;
quotient /= target_radix;
inner.push(rem as usize);
@ -563,7 +563,7 @@ macro_rules! impl_from_larger {
loop {
rem = quotient % target_radix;
quotient = quotient / target_radix;
quotient /= target_radix;
inner.push(rem as usize);

View File

@ -3,6 +3,7 @@
//! Playin' with Numerics in Rust
#![forbid(unsafe_code)]
#![no_std]
#![warn(clippy::all, clippy::pedantic)]
#[cfg(all(feature = "alloc", not(feature = "std")))]
#[macro_use]