libextra: Add a stray deriving or two.
This commit is contained in:
parent
3f8d548914
commit
3d13d4b58d
@ -27,6 +27,7 @@ use term;
|
||||
use time::precise_time_ns;
|
||||
use treemap::TreeMap;
|
||||
|
||||
use std::clone::Clone;
|
||||
use std::comm::{stream, SharedChan};
|
||||
use std::either;
|
||||
use std::io;
|
||||
@ -93,7 +94,7 @@ pub struct TestDescAndFn {
|
||||
testfn: TestFn,
|
||||
}
|
||||
|
||||
#[deriving(Encodable,Decodable,Eq)]
|
||||
#[deriving(Clone, Encodable, Decodable, Eq)]
|
||||
pub struct Metric {
|
||||
value: f64,
|
||||
noise: f64
|
||||
@ -102,6 +103,12 @@ pub struct Metric {
|
||||
#[deriving(Eq)]
|
||||
pub struct MetricMap(TreeMap<~str,Metric>);
|
||||
|
||||
impl Clone for MetricMap {
|
||||
pub fn clone(&self) -> MetricMap {
|
||||
MetricMap((**self).clone())
|
||||
}
|
||||
}
|
||||
|
||||
/// Analysis of a single change in metric
|
||||
#[deriving(Eq)]
|
||||
pub enum MetricChange {
|
||||
|
@ -34,6 +34,7 @@ use std::iterator::FromIterator;
|
||||
// These would be convenient since the methods work like `each`
|
||||
|
||||
#[allow(missing_doc)]
|
||||
#[deriving(Clone)]
|
||||
pub struct TreeMap<K, V> {
|
||||
priv root: Option<~TreeNode<K, V>>,
|
||||
priv length: uint
|
||||
@ -506,6 +507,7 @@ pub struct TreeSetIterator<'self, T> {
|
||||
|
||||
// Nodes keep track of their level in the tree, starting at 1 in the
|
||||
// leaves and with a red child sharing the level of the parent.
|
||||
#[deriving(Clone)]
|
||||
struct TreeNode<K, V> {
|
||||
key: K,
|
||||
value: V,
|
||||
|
Loading…
x
Reference in New Issue
Block a user