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>(
618618mod tests {
619619 use super :: * ;
620620
621- impl Atom for usize {
622- fn index ( self ) -> usize {
623- self
624- }
625- }
621+ type Idx = u32 ;
626622
627623 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 > > ,
630626 ) -> bool {
631627 let diff1 = compare_errors ( errors1, errors2) ;
632628 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 +
118118 fn index ( self ) -> usize ;
119119}
120120
121+ impl Atom for u32 {
122+ fn index ( self ) -> usize {
123+ self as usize
124+ }
125+ }
126+
121127pub trait FactTypes : Copy + Clone + Debug {
122128 type Origin : Atom ;
123129 type Loan : Atom ;
You can’t perform that action at this time.
0 commit comments