From d6b0825b9a1a59aa4b98401f1b5aabbb4b959c67 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 11 Sep 2020 15:25:05 -0400 Subject: [PATCH] Update formatting --- src/bigint.rs | 12 ++++++------ src/num.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bigint.rs b/src/bigint.rs index be85e9e..8472bb3 100644 --- a/src/bigint.rs +++ b/src/bigint.rs @@ -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); diff --git a/src/num.rs b/src/num.rs index 262fe4d..9a83a8d 100644 --- a/src/num.rs +++ b/src/num.rs @@ -65,7 +65,7 @@ impl PartialOrd for Sign { Self::Negative => match other { Self::Positive => Some(Ordering::Less), Self::Negative => Some(Ordering::Equal), - } + }, } } }