diff --git a/ITF1788 b/ITF1788 index 0ea3ff7..9c98d9f 160000 --- a/ITF1788 +++ b/ITF1788 @@ -1 +1 @@ -Subproject commit 0ea3ff795ab647bffb2ea0f88a8de53e9aafd887 +Subproject commit 9c98d9fa4eb0ee6bdf15b0d24b7e0b5cfd01acdd diff --git a/src/absmax.rs b/src/absmax.rs index 7f3ff7c..8cf1d23 100644 --- a/src/absmax.rs +++ b/src/absmax.rs @@ -89,8 +89,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn empty() { diff --git a/src/arith.rs b/src/arith.rs index 32c3954..9910a64 100644 --- a/src/arith.rs +++ b/src/arith.rs @@ -319,8 +319,8 @@ impl_op_assign!(DivAssign, div_assign, div); #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn add_assign() { diff --git a/src/basic.rs b/src/basic.rs index c2b9387..c4760e0 100644 --- a/src/basic.rs +++ b/src/basic.rs @@ -233,8 +233,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn empty() { diff --git a/src/bytes.rs b/src/bytes.rs index 7525fb1..2e47827 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -127,9 +127,9 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type D = Decoration; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Decoration as D; + use Interval as I; #[test] fn interval() { diff --git a/src/classify.rs b/src/classify.rs index f4e11d4..9043368 100644 --- a/src/classify.rs +++ b/src/classify.rs @@ -114,7 +114,7 @@ pub(crate) enum IntervalClass2 { mod tests { use super::*; use crate::*; - type I = Interval; + use Interval as I; #[test] fn classify() { diff --git a/src/constants.rs b/src/constants.rs index 815ea1a..62257f3 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -103,8 +103,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type I = Interval; - type DI = DecInterval; + use DecInterval as DI; + use Interval as I; // This only works with positive numbers. fn succ(x: f64) -> f64 { diff --git a/src/elementary.rs b/src/elementary.rs index ab1eb3c..2b0704c 100644 --- a/src/elementary.rs +++ b/src/elementary.rs @@ -782,8 +782,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn nai() { diff --git a/src/format.rs b/src/format.rs index 9c4cf98..5951c7f 100644 --- a/src/format.rs +++ b/src/format.rs @@ -101,9 +101,9 @@ impl fmt::LowerHex for DecInterval { #[cfg(test)] mod tests { use crate::*; - type D = Decoration; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Decoration as D; + use Interval as I; #[test] fn format() { diff --git a/src/integer.rs b/src/integer.rs index 096a957..0e61b49 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -223,8 +223,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn empty() { diff --git a/src/overlap.rs b/src/overlap.rs index 34b4106..acf8f08 100644 --- a/src/overlap.rs +++ b/src/overlap.rs @@ -283,7 +283,7 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; + use DecInterval as DI; #[test] fn nai() { diff --git a/src/parse.rs b/src/parse.rs index 832bba9..b2fd8d6 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -659,8 +659,8 @@ impl Interval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn parse() { diff --git a/src/set_op.rs b/src/set_op.rs index 8417d39..5d3370f 100644 --- a/src/set_op.rs +++ b/src/set_op.rs @@ -67,8 +67,8 @@ impl DecInterval { #[cfg(test)] mod tests { use crate::*; - type DI = DecInterval; - type I = Interval; + use DecInterval as DI; + use Interval as I; #[test] fn empty() { diff --git a/tests/itf1788.rs b/tests/itf1788.rs index dbf12eb..12c22e7 100644 --- a/tests/itf1788.rs +++ b/tests/itf1788.rs @@ -1,12 +1,13 @@ -#![allow( +use inari::*; + +#[allow( + unused_attributes, + unused_imports, clippy::approx_constant, clippy::eq_op, clippy::excessive_precision, clippy::float_cmp )] - -use inari::*; - mod itf1788_tests { //mod abs_rev; mod atan2; @@ -75,6 +76,7 @@ impl Eq2 for Interval {} impl Eq2 for Overlap {} impl Eq2 for f64 { + #[allow(clippy::float_cmp)] fn eq2(&self, rhs: &Self) -> bool { self.is_nan() && rhs.is_nan() || self == rhs } diff --git a/tests/itf1788_tests/atan2.rs b/tests/itf1788_tests/atan2.rs index c316b02..e114e8c 100644 --- a/tests/itf1788_tests/atan2.rs +++ b/tests/itf1788_tests/atan2.rs @@ -12,7 +12,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -20,7 +19,7 @@ //Preamble use crate::*; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[cfg(feature = "gmp")] #[test] diff --git a/tests/itf1788_tests/c_xsc.rs b/tests/itf1788_tests/c_xsc.rs index 93516b1..96e6d2e 100644 --- a/tests/itf1788_tests/c_xsc.rs +++ b/tests/itf1788_tests/c_xsc.rs @@ -26,7 +26,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -34,7 +33,7 @@ //Preamble use crate::*; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; // Tests A+B, B+A, A-B, B-A, -A, +A #[test] diff --git a/tests/itf1788_tests/fi_lib.rs b/tests/itf1788_tests/fi_lib.rs index 892abd7..d50417b 100644 --- a/tests/itf1788_tests/fi_lib.rs +++ b/tests/itf1788_tests/fi_lib.rs @@ -30,7 +30,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -38,6 +37,7 @@ //Preamble use crate::*; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn fi_lib_addii() { diff --git a/tests/itf1788_tests/ieee1788_constructors.rs b/tests/itf1788_tests/ieee1788_constructors.rs index 224d874..0680719 100644 --- a/tests/itf1788_tests/ieee1788_constructors.rs +++ b/tests/itf1788_tests/ieee1788_constructors.rs @@ -12,7 +12,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -20,9 +19,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; // According to the examples in Section 7.4.2, unbounded intervals can be constructed with non-common inputs. #[test] diff --git a/tests/itf1788_tests/ieee1788_exceptions.rs b/tests/itf1788_tests/ieee1788_exceptions.rs index 097ea1b..c0c2ceb 100644 --- a/tests/itf1788_tests/ieee1788_exceptions.rs +++ b/tests/itf1788_tests/ieee1788_exceptions.rs @@ -12,7 +12,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -20,8 +19,7 @@ //Preamble use crate::*; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[cfg(feature = "gmp")] #[test] diff --git a/tests/itf1788_tests/libieeep1788_bool.rs b/tests/itf1788_tests/libieeep1788_bool.rs index 3091abd..81a2814 100644 --- a/tests/itf1788_tests/libieeep1788_bool.rs +++ b/tests/itf1788_tests/libieeep1788_bool.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_is_empty_test() { diff --git a/tests/itf1788_tests/libieeep1788_class.rs b/tests/itf1788_tests/libieeep1788_class.rs index f533e8b..2e250a0 100644 --- a/tests/itf1788_tests/libieeep1788_class.rs +++ b/tests/itf1788_tests/libieeep1788_class.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_nums_to_interval_test() { diff --git a/tests/itf1788_tests/libieeep1788_elem.rs b/tests/itf1788_tests/libieeep1788_elem.rs index ab4e4d5..602f9b9 100644 --- a/tests/itf1788_tests/libieeep1788_elem.rs +++ b/tests/itf1788_tests/libieeep1788_elem.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_neg_test() { diff --git a/tests/itf1788_tests/libieeep1788_num.rs b/tests/itf1788_tests/libieeep1788_num.rs index 803256b..6337ec2 100644 --- a/tests/itf1788_tests/libieeep1788_num.rs +++ b/tests/itf1788_tests/libieeep1788_num.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_inf_test() { diff --git a/tests/itf1788_tests/libieeep1788_overlap.rs b/tests/itf1788_tests/libieeep1788_overlap.rs index 59f4f52..57e9857 100644 --- a/tests/itf1788_tests/libieeep1788_overlap.rs +++ b/tests/itf1788_tests/libieeep1788_overlap.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,10 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; -type O = inari::Overlap; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_overlap_test() { diff --git a/tests/itf1788_tests/libieeep1788_rec_bool.rs b/tests/itf1788_tests/libieeep1788_rec_bool.rs index 8014818..e7f1dcb 100644 --- a/tests/itf1788_tests/libieeep1788_rec_bool.rs +++ b/tests/itf1788_tests/libieeep1788_rec_bool.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_is_common_interval_test() { diff --git a/tests/itf1788_tests/libieeep1788_set.rs b/tests/itf1788_tests/libieeep1788_set.rs index 1b99ca1..ac226a9 100644 --- a/tests/itf1788_tests/libieeep1788_set.rs +++ b/tests/itf1788_tests/libieeep1788_set.rs @@ -22,7 +22,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -30,9 +29,7 @@ //Preamble use crate::*; -type D = inari::Decoration; -type DI = inari::DecInterval; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn minimal_intersection_test() { diff --git a/tests/itf1788_tests/mpfi.rs b/tests/itf1788_tests/mpfi.rs index 1defe60..f5d7f78 100644 --- a/tests/itf1788_tests/mpfi.rs +++ b/tests/itf1788_tests/mpfi.rs @@ -27,7 +27,6 @@ */ //Language imports #![rustfmt::skip] -#![allow(unused_attributes, unused_imports)] //Test library imports @@ -35,7 +34,7 @@ //Preamble use crate::*; -type I = inari::Interval; +use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O}; #[test] fn mpfi_abs() {