Skip to content

Commit 09d55c8

Browse files
committed
---
yaml --- r: 182631 b: refs/heads/beta c: 8a6a129 h: refs/heads/master i: 182629: b8b1870 182627: 28684a1 182623: abe870e v: v3
1 parent cce5b4c commit 09d55c8

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 27b3e14d7fa5f6e07f38ca174daed489edcfc113
34+
refs/heads/beta: 8a6a129aec86341a2b066a338a78b9e5509137c5
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/src/libtest/lib.rs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,14 @@ use self::OutputLocation::*;
5454
use stats::Stats;
5555
use getopts::{OptGroup, optflag, optopt};
5656
use regex::Regex;
57-
use serialize::{json, Decodable, Encodable};
57+
use serialize::Encodable;
5858
use term::Terminal;
5959
use term::color::{Color, RED, YELLOW, GREEN, CYAN};
6060

6161
use std::any::Any;
6262
use std::cmp;
6363
use std::collections::BTreeMap;
6464
use std::fmt;
65-
use std::io::fs::PathExtensions;
6665
use std::io::stdio::StdWriter;
6766
use std::io::{File, ChanReader, ChanWriter};
6867
use std::io;
@@ -990,30 +989,6 @@ impl MetricMap {
990989
MetricMap(BTreeMap::new())
991990
}
992991

993-
/// Load MetricDiff from a file.
994-
///
995-
/// # Panics
996-
///
997-
/// This function will panic if the path does not exist or the path does not
998-
/// contain a valid metric map.
999-
pub fn load(p: &Path) -> MetricMap {
1000-
assert!(p.exists());
1001-
let mut f = File::open(p).unwrap();
1002-
let value = json::from_reader(&mut f as &mut io::Reader).unwrap();
1003-
let mut decoder = json::Decoder::new(value);
1004-
MetricMap(match Decodable::decode(&mut decoder) {
1005-
Ok(t) => t,
1006-
Err(e) => panic!("failure decoding JSON: {:?}", e)
1007-
})
1008-
}
1009-
1010-
/// Write MetricDiff to a file.
1011-
pub fn save(&self, p: &Path) -> io::IoResult<()> {
1012-
let mut file = try!(File::create(p));
1013-
let MetricMap(ref map) = *self;
1014-
write!(&mut file, "{}", json::as_json(map))
1015-
}
1016-
1017992
/// Insert a named `value` (+/- `noise`) metric into the map. The value
1018993
/// must be non-negative. The `noise` indicates the uncertainty of the
1019994
/// metric, which doubles as the "noise range" of acceptable

0 commit comments

Comments
 (0)