Semantic version test fix.
This commit is contained in:
parent
33a3a96b44
commit
0125125c27
@ -92,7 +92,10 @@ pub type Bytes = Vec<u8>;
|
||||
|
||||
/// Slice of bytes to underlying memory
|
||||
pub trait BytesConvertable {
|
||||
// TODO: rename to as_slice
|
||||
fn bytes(&self) -> &[u8];
|
||||
fn as_slice(&self) -> &[u8] { self.bytes() }
|
||||
fn to_bytes(&self) -> Bytes { self.as_slice().to_vec() }
|
||||
}
|
||||
|
||||
impl<'a> BytesConvertable for &'a [u8] {
|
||||
|
@ -13,6 +13,7 @@ pub enum EthcoreError {
|
||||
FromHex(FromHexError),
|
||||
BaseData(BaseDataError),
|
||||
BadSize,
|
||||
UnknownName,
|
||||
}
|
||||
|
||||
impl From<FromHexError> for EthcoreError {
|
||||
|
@ -2,8 +2,8 @@
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// extern crate ethcore;
|
||||
/// use ethcore::engine::*;
|
||||
/// extern crate ethcore_util;
|
||||
/// use ethcore_util::semantic_version::*;
|
||||
/// fn main() {
|
||||
/// assert_eq!(SemanticVersion::new(1, 2, 3).as_u32(), 0x010203);
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user