@@ -24,7 +24,7 @@ use std::fmt;
2424use std:: path:: Path ;
2525use std:: sync:: Arc ;
2626
27- #[ derive( Debug , Clone , Eq , Hash , Ord , PartialOrd ) ]
27+ #[ derive( Debug , Clone , Eq , Hash , Ord , PartialEq , PartialOrd ) ]
2828pub struct PerfState {
2929 pub cost : usize ,
3030 pub frequency : usize ,
@@ -33,7 +33,7 @@ pub struct PerfState {
3333 pub power : usize ,
3434}
3535
36- #[ derive( Debug , Clone , Eq , Hash , Ord , PartialOrd ) ]
36+ #[ derive( Debug , Clone , Eq , Hash , Ord , PartialEq , PartialOrd ) ]
3737pub struct PerfDomain {
3838 /// Monotonically increasing unique id.
3939 pub id : usize ,
@@ -130,12 +130,6 @@ impl PerfDomain {
130130 }
131131}
132132
133- impl PartialEq for PerfDomain {
134- fn eq ( & self , other : & Self ) -> bool {
135- self . id == other. id && self . span == other. span && self . perf_table == other. perf_table
136- }
137- }
138-
139133impl PerfState {
140134 /// Build a PerfState
141135 pub fn new ( root : String ) -> Result < PerfState > {
@@ -155,15 +149,6 @@ impl PerfState {
155149 }
156150}
157151
158- impl PartialEq for PerfState {
159- fn eq ( & self , other : & Self ) -> bool {
160- self . cost == other. cost
161- && self . frequency == other. frequency
162- && self . performance == other. performance
163- && self . power == other. power
164- }
165- }
166-
167152impl fmt:: Display for EnergyModel {
168153 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
169154 for ( _, pd) in self . perf_doms . iter ( ) {
0 commit comments