File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
polonius-engine/src/output Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -618,15 +618,11 @@ fn compare_errors<Loan: Atom, Point: Atom>(
618
618
mod tests {
619
619
use super :: * ;
620
620
621
- impl Atom for usize {
622
- fn index ( self ) -> usize {
623
- self
624
- }
625
- }
621
+ type Idx = u32 ;
626
622
627
623
fn compare (
628
- errors1 : & FxHashMap < usize , Vec < usize > > ,
629
- errors2 : & FxHashMap < usize , Vec < usize > > ,
624
+ errors1 : & FxHashMap < Idx , Vec < Idx > > ,
625
+ errors2 : & FxHashMap < Idx , Vec < Idx > > ,
630
626
) -> bool {
631
627
let diff1 = compare_errors ( errors1, errors2) ;
632
628
let diff2 = compare_errors ( errors2, errors1) ;
Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ pub trait Atom: From<u32> + Into<u32> + Copy + Clone + Debug + Eq + Ord + Hash +
118
118
fn index ( self ) -> usize ;
119
119
}
120
120
121
+ impl Atom for u32 {
122
+ fn index ( self ) -> usize {
123
+ self as usize
124
+ }
125
+ }
126
+
121
127
pub trait FactTypes : Copy + Clone + Debug {
122
128
type Origin : Atom ;
123
129
type Loan : Atom ;
You can’t perform that action at this time.
0 commit comments