Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address clippy::upper_case_acronyms #41

Merged
merged 2 commits into from
Feb 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ITF1788
4 changes: 2 additions & 2 deletions src/absmax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/arith.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/classify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub(crate) enum IntervalClass2 {
mod tests {
use super::*;
use crate::*;
type I = Interval;
use Interval as I;

#[test]
fn classify() {
Expand Down
4 changes: 2 additions & 2 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/elementary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/overlap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl DecInterval {
#[cfg(test)]
mod tests {
use crate::*;
type DI = DecInterval;
use DecInterval as DI;

#[test]
fn nai() {
Expand Down
4 changes: 2 additions & 2 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/set_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
10 changes: 6 additions & 4 deletions tests/itf1788.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions tests/itf1788_tests/atan2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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]
Expand Down
3 changes: 1 addition & 2 deletions tests/itf1788_tests/c_xsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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]
Expand Down
2 changes: 1 addition & 1 deletion tests/itf1788_tests/fi_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//Preamble
use crate::*;
use inari::{DecInterval as DI, Decoration as D, Interval as I, Overlap as O};

#[test]
fn fi_lib_addii() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/ieee1788_constructors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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]
Expand Down
4 changes: 1 addition & 3 deletions tests/itf1788_tests/ieee1788_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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]
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_elem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
6 changes: 1 addition & 5 deletions tests/itf1788_tests/libieeep1788_overlap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_rec_bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
5 changes: 1 addition & 4 deletions tests/itf1788_tests/libieeep1788_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down
3 changes: 1 addition & 2 deletions tests/itf1788_tests/mpfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
*/
//Language imports
#![rustfmt::skip]
#![allow(unused_attributes, unused_imports)]

//Test library imports

//Arithmetic library imports

//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() {
Expand Down