Skip to content

Commit

Permalink
Use std::cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
pierwill committed Dec 15, 2021
1 parent d0b20cd commit b1337cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chalk-solve/src/display/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
fmt::{Debug, Display, Formatter, Result},
marker::PhantomData,
rc::Rc,
sync::{Arc, Mutex},
sync::{Arc, Mutex}, cmp::{PartialEq, Eq}, hash::Hash,
};

use crate::RustIrDatabase;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub struct IdAliasStore<T> {
next_unused_for_name: IndexMap<String, u32>,
}

impl<T: std::cmp::PartialEq + std::cmp::Eq + std::hash::Hash> Default for IdAliasStore<T> {
impl<T: PartialEq + Eq + Hash> Default for IdAliasStore<T> {
fn default() -> Self {
IdAliasStore {
aliases: IndexMap::default(),
Expand All @@ -61,7 +61,7 @@ impl<T: std::cmp::PartialEq + std::cmp::Eq + std::hash::Hash> Default for IdAlia
}
}

impl<T: Copy + std::cmp::PartialEq + std::cmp::Eq + std::hash::Hash> IdAliasStore<T> {
impl<T: Copy + PartialEq + Eq + Hash> IdAliasStore<T> {
fn alias_for_id_name(&mut self, id: T, name: String) -> String {
let next_unused_for_name = &mut self.next_unused_for_name;
let alias = *self.aliases.entry(id).or_insert_with(|| {
Expand Down

0 comments on commit b1337cf

Please sign in to comment.