File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ use term;
27
27
use time:: precise_time_ns;
28
28
use treemap:: TreeMap ;
29
29
30
+ use std:: clone:: Clone ;
30
31
use std:: comm:: { stream, SharedChan } ;
31
32
use std:: either;
32
33
use std:: io;
@@ -93,7 +94,7 @@ pub struct TestDescAndFn {
93
94
testfn : TestFn ,
94
95
}
95
96
96
- #[ deriving( Encodable , Decodable , Eq ) ]
97
+ #[ deriving( Clone , Encodable , Decodable , Eq ) ]
97
98
pub struct Metric {
98
99
value : f64 ,
99
100
noise : f64
@@ -102,6 +103,12 @@ pub struct Metric {
102
103
#[ deriving( Eq ) ]
103
104
pub struct MetricMap ( TreeMap < ~str , Metric > ) ;
104
105
106
+ impl Clone for MetricMap {
107
+ pub fn clone ( & self ) -> MetricMap {
108
+ MetricMap ( ( * * self ) . clone ( ) )
109
+ }
110
+ }
111
+
105
112
/// Analysis of a single change in metric
106
113
#[ deriving( Eq ) ]
107
114
pub enum MetricChange {
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ use std::iterator::FromIterator;
34
34
// These would be convenient since the methods work like `each`
35
35
36
36
#[ allow( missing_doc) ]
37
+ #[ deriving( Clone ) ]
37
38
pub struct TreeMap < K , V > {
38
39
priv root : Option < ~TreeNode < K , V > > ,
39
40
priv length : uint
@@ -506,6 +507,7 @@ pub struct TreeSetIterator<'self, T> {
506
507
507
508
// Nodes keep track of their level in the tree, starting at 1 in the
508
509
// leaves and with a red child sharing the level of the parent.
510
+ #[ deriving( Clone ) ]
509
511
struct TreeNode < K , V > {
510
512
key : K ,
511
513
value : V ,
You can’t perform that action at this time.
0 commit comments