Skip to content

Commit b02f5cd

Browse files
committed
---
yaml --- r: 142936 b: refs/heads/try2 c: 3d13d4b h: refs/heads/master v: v3
1 parent 78619de commit b02f5cd

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3f8d548914fac1e7c32fcd9a903590d0fe21c64f
8+
refs/heads/try2: 3d13d4b58d5d871312537fabd736811c13ebcf4d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/test.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use term;
2727
use time::precise_time_ns;
2828
use treemap::TreeMap;
2929

30+
use std::clone::Clone;
3031
use std::comm::{stream, SharedChan};
3132
use std::either;
3233
use std::io;
@@ -93,7 +94,7 @@ pub struct TestDescAndFn {
9394
testfn: TestFn,
9495
}
9596

96-
#[deriving(Encodable,Decodable,Eq)]
97+
#[deriving(Clone, Encodable, Decodable, Eq)]
9798
pub struct Metric {
9899
value: f64,
99100
noise: f64
@@ -102,6 +103,12 @@ pub struct Metric {
102103
#[deriving(Eq)]
103104
pub struct MetricMap(TreeMap<~str,Metric>);
104105

106+
impl Clone for MetricMap {
107+
pub fn clone(&self) -> MetricMap {
108+
MetricMap((**self).clone())
109+
}
110+
}
111+
105112
/// Analysis of a single change in metric
106113
#[deriving(Eq)]
107114
pub enum MetricChange {

branches/try2/src/libextra/treemap.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ use std::iterator::FromIterator;
3434
// These would be convenient since the methods work like `each`
3535

3636
#[allow(missing_doc)]
37+
#[deriving(Clone)]
3738
pub struct TreeMap<K, V> {
3839
priv root: Option<~TreeNode<K, V>>,
3940
priv length: uint
@@ -506,6 +507,7 @@ pub struct TreeSetIterator<'self, T> {
506507

507508
// Nodes keep track of their level in the tree, starting at 1 in the
508509
// leaves and with a red child sharing the level of the parent.
510+
#[deriving(Clone)]
509511
struct TreeNode<K, V> {
510512
key: K,
511513
value: V,

0 commit comments

Comments
 (0)