Add some clippy checks
All checks were successful
timw4mail/rusty-numbers/pipeline/head This commit looks good
All checks were successful
timw4mail/rusty-numbers/pipeline/head This commit looks good
This commit is contained in:
parent
67d3e7780b
commit
eaec59f596
@ -1,7 +1,7 @@
|
|||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
//! \[WIP\] Arbitrarily large integers
|
//! \[WIP\] Arbitrarily large integers
|
||||||
use crate::num::Sign::*;
|
use crate::num::FracOp;
|
||||||
use crate::num::*;
|
use crate::num::Sign::{self, Positive, Negative};
|
||||||
|
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
@ -423,7 +423,7 @@ impl Not for BigInt {
|
|||||||
fn not(self) -> Self::Output {
|
fn not(self) -> Self::Output {
|
||||||
let mut flipped: Vec<usize> = Vec::with_capacity(self.inner.len());
|
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;
|
let rev = !*val;
|
||||||
flipped.push(rev);
|
flipped.push(rev);
|
||||||
}
|
}
|
||||||
@ -529,7 +529,7 @@ macro_rules! impl_from_larger {
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
rem = quotient % target_radix;
|
rem = quotient % target_radix;
|
||||||
quotient = quotient / target_radix;
|
quotient /= target_radix;
|
||||||
|
|
||||||
inner.push(rem as usize);
|
inner.push(rem as usize);
|
||||||
|
|
||||||
@ -563,7 +563,7 @@ macro_rules! impl_from_larger {
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
rem = quotient % target_radix;
|
rem = quotient % target_radix;
|
||||||
quotient = quotient / target_radix;
|
quotient /= target_radix;
|
||||||
|
|
||||||
inner.push(rem as usize);
|
inner.push(rem as usize);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
//! Playin' with Numerics in Rust
|
//! Playin' with Numerics in Rust
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![warn(clippy::all, clippy::pedantic)]
|
||||||
|
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
Loading…
Reference in New Issue
Block a user