handling invalid spec jsons properly, additional tests, closes #1840
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
//! Diff misc.
|
||||
|
||||
use std::fs::File;
|
||||
use common::*;
|
||||
use rlp::{Stream, RlpStream};
|
||||
use target_info::Target;
|
||||
@@ -33,14 +32,6 @@ pub enum Filth {
|
||||
Dirty,
|
||||
}
|
||||
|
||||
/// Read the whole contents of a file `name`.
|
||||
pub fn contents(name: &str) -> Result<Bytes, UtilError> {
|
||||
let mut file = try!(File::open(name));
|
||||
let mut ret: Vec<u8> = Vec::new();
|
||||
try!(file.read_to_end(&mut ret));
|
||||
Ok(ret)
|
||||
}
|
||||
|
||||
/// Get the standard version string for this software.
|
||||
pub fn version() -> String {
|
||||
let sha3 = short_sha();
|
||||
@@ -64,4 +55,4 @@ pub fn version_data() -> Bytes {
|
||||
s.append(&rustc_version());
|
||||
s.append(&&Target::os()[0..2]);
|
||||
s.out()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user