@@ -177,7 +177,7 @@ impl<T> BytesConvertable for T where T: AsRef<[u8]> {
|
||||
#[test]
|
||||
fn bytes_convertable() {
|
||||
assert_eq!(vec![0x12u8, 0x34].bytes(), &[0x12u8, 0x34]);
|
||||
assert_eq!([0u8; 0].bytes(), &[]);
|
||||
assert!([0u8; 0].bytes().is_empty());
|
||||
}
|
||||
|
||||
/// Simple trait to allow for raw population of a Sized object from a byte slice.
|
||||
|
||||
@@ -70,7 +70,7 @@ pub fn contents(name: &str) -> Result<Bytes, UtilError> {
|
||||
|
||||
/// Get the standard version string for this software.
|
||||
pub fn version() -> String {
|
||||
format!("Parity/v{}-{}-{}/{}-{}-{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date().replace("-", ""), Target::arch(), Target::os(), Target::env(), rustc_version::version())
|
||||
format!("Parity/v{}-beta-{}-{}/{}-{}-{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date().replace("-", ""), Target::arch(), Target::os(), Target::env(), rustc_version::version())
|
||||
}
|
||||
|
||||
/// Get the standard version data for this software.
|
||||
@@ -85,4 +85,4 @@ pub fn version_data() -> Bytes {
|
||||
s.append(&format!("{}", rustc_version::version()));
|
||||
s.append(&&Target::os()[0..2]);
|
||||
s.out()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user