Skip to content

Commit f943da4

Browse files
chore: address clippy warnings
1 parent bc9f500 commit f943da4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ mod test;
241241
/// - `$hash_builder:expr` optional hash builder, an
242242
/// implementation of [`std::hash::BuildHasher`] ;
243243
/// - `$typ:typ,` type being hashconsed (the underlying type, not the
244-
/// hashconsed one) ;
244+
/// hashconsed one) ;
245245
#[macro_export]
246246
macro_rules! consign {
247247
(
@@ -355,7 +355,7 @@ impl<T> Eq for HConsed<T> {}
355355
impl<T> PartialOrd for HConsed<T> {
356356
#[inline]
357357
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
358-
self.uid.partial_cmp(&other.uid)
358+
Some(self.cmp(other))
359359
}
360360
}
361361
impl<T> Ord for HConsed<T> {
@@ -447,7 +447,7 @@ impl<T> Eq for WHConsed<T> {}
447447
impl<T> PartialOrd for WHConsed<T> {
448448
#[inline]
449449
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
450-
self.uid.partial_cmp(&other.uid)
450+
Some(self.cmp(other))
451451
}
452452
}
453453
impl<T> Ord for WHConsed<T> {
@@ -674,7 +674,7 @@ pub trait HashConsign<T: Hash>: Sized {
674674
/// Reserves capacity for at least `additional` more elements.
675675
fn reserve(self, additional: usize);
676676
}
677-
impl<'a, T: Hash + Eq + Clone, S: BuildHasher> HashConsign<T> for &'a mut HConsign<T, S> {
677+
impl<T: Hash + Eq + Clone, S: BuildHasher> HashConsign<T> for &mut HConsign<T, S> {
678678
fn mk_is_new(self, elm: T) -> (HConsed<T>, bool) {
679679
// If the element is known and upgradable return it.
680680
if let Some(hconsed) = self.get(&elm) {
@@ -747,7 +747,7 @@ macro_rules! get {
747747
};
748748
}
749749

750-
impl<'a, T: Hash + Eq + Clone> HashConsign<T> for &'a RwLock<HConsign<T>> {
750+
impl<T: Hash + Eq + Clone> HashConsign<T> for &RwLock<HConsign<T>> {
751751
/// If the element is already in the consign, only read access will be
752752
/// requested.
753753
fn mk_is_new(self, elm: T) -> (HConsed<T>, bool) {

0 commit comments

Comments
 (0)