Update formatting
Some checks failed
timw4mail/rusty-numbers/pipeline/head There was a failure building this commit

This commit is contained in:
Timothy Warren 2020-09-11 15:25:05 -04:00
parent d90b762754
commit d6b0825b9a
2 changed files with 7 additions and 7 deletions

View File

@ -6,14 +6,14 @@ use crate::num::*;
#[cfg(all(feature = "alloc", not(feature = "std")))]
extern crate alloc;
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::vec::*;
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::string::*;
#[cfg(all(feature = "alloc", not(feature = "std")))]
use alloc::vec::*;
#[cfg(feature = "std")]
use std::prelude::v1::*;
use core::cmp::{Ordering, PartialOrd, PartialEq};
use core::cmp::{Ordering, PartialEq, PartialOrd};
use core::convert::*;
use core::mem::replace;
use core::ops::{
@ -576,7 +576,7 @@ impl_from_larger!((i128, u128));
impl_from_smaller!((i8, u8), (i16, u16), (i32, u32), (i64, u64));
// Implement PartialEq and PartialOrd to compare against BigInt values
impl_ord_literal!(i8,u8,i16,u16,i32,u32,i64,u64,i128,u128);
impl_ord_literal!(i8, u8, i16, u16, i32, u32, i64, u64, i128, u128);
#[cfg(test)]
#[cfg_attr(tarpaulin, skip)]
@ -866,7 +866,7 @@ mod tests {
#[test]
fn test_from_large_unsigned() {
let big_num: u128 = 9*RADIX + 8;
let big_num: u128 = 9 * RADIX + 8;
let res = BigInt::from(big_num);
assert_eq!(res.sign, Sign::Positive, "{:#?}", res);
@ -876,7 +876,7 @@ mod tests {
#[test]
fn test_from_large_signed() {
let big_num: i128 = 2*I_RADIX + 3;
let big_num: i128 = 2 * I_RADIX + 3;
let res = BigInt::from(-big_num);
assert_eq!(res.sign, Sign::Negative, "{:#?}", res);

View File

@ -65,7 +65,7 @@ impl PartialOrd for Sign {
Self::Negative => match other {
Self::Positive => Some(Ordering::Less),
Self::Negative => Some(Ordering::Equal),
}
},
}
}
}