File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,13 @@ impl InstanceState {
9090
9191impl PartialEq for InstanceState {
9292 fn eq ( & self , other : & Self ) -> bool {
93- self . cmp ( other) == Ordering :: Equal
93+ match ( self , other) {
94+ ( InstanceState :: Unknown , InstanceState :: Unknown ) => true ,
95+ ( InstanceState :: Valid ( a) , InstanceState :: Valid ( b) ) => a == b,
96+ ( InstanceState :: Invalid ( a) , InstanceState :: Invalid ( b) ) => a == b,
97+ ( InstanceState :: Suspect ( a) , InstanceState :: Suspect ( b) ) => a == b,
98+ _ => false ,
99+ }
94100 }
95101}
96102
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ fn removes_instance_with_versions_by_name_strategy() {
223223 overridden: None ,
224224 } ,
225225 ExpectedInstance {
226- state: InstanceState :: valid( IsNonSemverButIdentical ) ,
226+ state: InstanceState :: valid( IsHighestOrLowestSemver ) ,
227227 dependency_name: "lodash" ,
228228 id: "lodash in /dependencies of package-a" ,
229229 actual: "4.17.21" ,
You can’t perform that action at this time.
0 commit comments