Skip to content

Commit 0c9db66

Browse files
committed
Fix unused_qualifications lint errors
1 parent 2491f53 commit 0c9db66

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#![deny(missing_docs, intra_doc_link_resolution_failure)]
1616
#![deny(missing_debug_implementations)]
1717
#![warn(rust_2018_idioms)]
18+
#![warn(trivial_casts, trivial_numeric_casts)]
19+
#![warn(unused_qualifications)]
20+
#![warn(variant_size_differences)]
1821
#![forbid(unsafe_code)]
1922
#![cfg_attr(not(feature = "std"), no_std)]
2023

src/mt.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// option. All files in the project carrying such notice may not be copied,
1010
// modified, or distributed except according to those terms.
1111

12-
use core::cmp;
12+
use core::cmp::Ordering;
1313
use core::convert::TryFrom;
1414
use core::fmt;
1515
use core::hash;
@@ -54,25 +54,25 @@ pub struct Mt19937GenRand32 {
5454
state: [Wrapping<u32>; N],
5555
}
5656

57-
impl cmp::Eq for Mt19937GenRand32 {}
57+
impl Eq for Mt19937GenRand32 {}
5858

59-
impl cmp::PartialEq for Mt19937GenRand32 {
59+
impl PartialEq for Mt19937GenRand32 {
6060
fn eq(&self, other: &Self) -> bool {
6161
self.state[..] == other.state[..] && self.idx == other.idx
6262
}
6363
}
6464

65-
impl cmp::Ord for Mt19937GenRand32 {
66-
fn cmp(&self, other: &Self) -> cmp::Ordering {
65+
impl Ord for Mt19937GenRand32 {
66+
fn cmp(&self, other: &Self) -> Ordering {
6767
match self.state[..].cmp(&other.state[..]) {
68-
cmp::Ordering::Equal => self.idx.cmp(&other.idx),
68+
Ordering::Equal => self.idx.cmp(&other.idx),
6969
ordering => ordering,
7070
}
7171
}
7272
}
7373

74-
impl cmp::PartialOrd for Mt19937GenRand32 {
75-
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
74+
impl PartialOrd for Mt19937GenRand32 {
75+
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
7676
Some(self.cmp(other))
7777
}
7878
}

src/mt64.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// option. All files in the project carrying such notice may not be copied,
1010
// modified, or distributed except according to those terms.
1111

12-
use core::cmp;
12+
use core::cmp::Ordering;
1313
use core::convert::TryFrom;
1414
use core::fmt;
1515
use core::hash;
@@ -51,25 +51,25 @@ pub struct Mt19937GenRand64 {
5151
state: [Wrapping<u64>; NN],
5252
}
5353

54-
impl cmp::Eq for Mt19937GenRand64 {}
54+
impl Eq for Mt19937GenRand64 {}
5555

56-
impl cmp::PartialEq for Mt19937GenRand64 {
56+
impl PartialEq for Mt19937GenRand64 {
5757
fn eq(&self, other: &Self) -> bool {
5858
self.state[..] == other.state[..] && self.idx == other.idx
5959
}
6060
}
6161

62-
impl cmp::Ord for Mt19937GenRand64 {
63-
fn cmp(&self, other: &Self) -> cmp::Ordering {
62+
impl Ord for Mt19937GenRand64 {
63+
fn cmp(&self, other: &Self) -> Ordering {
6464
match self.state[..].cmp(&other.state[..]) {
65-
cmp::Ordering::Equal => self.idx.cmp(&other.idx),
65+
Ordering::Equal => self.idx.cmp(&other.idx),
6666
ordering => ordering,
6767
}
6868
}
6969
}
7070

71-
impl cmp::PartialOrd for Mt19937GenRand64 {
72-
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
71+
impl PartialOrd for Mt19937GenRand64 {
72+
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
7373
Some(self.cmp(other))
7474
}
7575
}

0 commit comments

Comments
 (0)