@@ -110,15 +110,13 @@ impl Show for TestName {
110
110
}
111
111
}
112
112
113
- #[ deriving( Clone ) ]
113
+ #[ deriving( Clone , Copy ) ]
114
114
enum NamePadding {
115
115
PadNone ,
116
116
PadOnLeft ,
117
117
PadOnRight ,
118
118
}
119
119
120
- impl Copy for NamePadding { }
121
-
122
120
impl TestDesc {
123
121
fn padded_name ( & self , column_count : uint , align : NamePadding ) -> String {
124
122
let mut name = String :: from_str ( self . name . as_slice ( ) ) ;
@@ -215,14 +213,12 @@ pub struct TestDescAndFn {
215
213
pub testfn : TestFn ,
216
214
}
217
215
218
- #[ deriving( Clone , Encodable , Decodable , PartialEq , Show ) ]
216
+ #[ deriving( Clone , Copy , Encodable , Decodable , PartialEq , Show ) ]
219
217
pub struct Metric {
220
218
value : f64 ,
221
219
noise : f64
222
220
}
223
221
224
- impl Copy for Metric { }
225
-
226
222
impl Metric {
227
223
pub fn new ( value : f64 , noise : f64 ) -> Metric {
228
224
Metric { value : value, noise : noise}
@@ -240,7 +236,7 @@ impl Clone for MetricMap {
240
236
}
241
237
242
238
/// Analysis of a single change in metric
243
- #[ deriving( PartialEq , Show ) ]
239
+ #[ deriving( Copy , PartialEq , Show ) ]
244
240
pub enum MetricChange {
245
241
LikelyNoise ,
246
242
MetricAdded ,
@@ -249,8 +245,6 @@ pub enum MetricChange {
249
245
Regression ( f64 )
250
246
}
251
247
252
- impl Copy for MetricChange { }
253
-
254
248
pub type MetricDiff = BTreeMap < String , MetricChange > ;
255
249
256
250
// The default console test runner. It accepts the command line
@@ -287,14 +281,13 @@ pub fn test_main_static(args: &[String], tests: &[TestDescAndFn]) {
287
281
test_main ( args, owned_tests)
288
282
}
289
283
284
+ #[ deriving( Copy ) ]
290
285
pub enum ColorConfig {
291
286
AutoColor ,
292
287
AlwaysColor ,
293
288
NeverColor ,
294
289
}
295
290
296
- impl Copy for ColorConfig { }
297
-
298
291
pub struct TestOpts {
299
292
pub filter : Option < Regex > ,
300
293
pub run_ignored : bool ,
0 commit comments