separate semantic_version from util (#6438)

This commit is contained in:
Hawstein 2017-09-02 19:14:21 +08:00 committed by Gav Wood
parent 0b5285c282
commit 2faa28ce9b
11 changed files with 20 additions and 4 deletions

5
Cargo.lock generated
View File

@ -536,6 +536,7 @@ dependencies = [
"rlp_derive 0.1.0",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semantic_version 0.1.0",
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"stats 0.1.0",
"table 0.1.0",
@ -2634,6 +2635,10 @@ dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semantic_version"
version = "0.1.0"
[[package]]
name = "semver"
version = "0.1.20"

View File

@ -62,6 +62,7 @@ bloomable = { path = "../util/bloomable" }
vm = { path = "vm" }
wasm = { path = "wasm" }
hash = { path = "../util/hash" }
semantic_version = { path = "../util/semantic_version" }
[dev-dependencies]
native-contracts = { path = "native_contracts", features = ["test_contracts"] }

View File

@ -42,6 +42,7 @@ use ethkey::{verify_address, Signature};
use io::{IoContext, IoHandler, TimerToken, IoService};
use itertools::{self, Itertools};
use rlp::{UntrustedRlp, encode};
use semantic_version::SemanticVersion;
use util::*;
mod finality;

View File

@ -31,6 +31,7 @@ use evm::Schedule;
use ethjson;
use header::{Header, BlockNumber};
use client::Client;
use semantic_version::SemanticVersion;
use super::signer::EngineSigner;
use super::validator_set::{ValidatorSet, SimpleList, new_validator_set};

View File

@ -54,6 +54,7 @@ use spec::CommonParams;
use transaction::{UnverifiedTransaction, SignedTransaction};
use ethkey::Signature;
use semantic_version::SemanticVersion;
use util::*;
/// Default EIP-210 contrat code.

View File

@ -48,6 +48,7 @@ use super::transition::TransitionHandler;
use super::vote_collector::VoteCollector;
use self::message::*;
use self::params::TendermintParams;
use semantic_version::SemanticVersion;
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
pub enum Step {

View File

@ -35,6 +35,7 @@ use evm::Schedule;
use ethjson;
use rlp::{self, UntrustedRlp};
use vm::LastHashes;
use semantic_version::SemanticVersion;
/// Parity tries to round block.gas_limit to multiple of this constant
pub const PARITY_GAS_LIMIT_DETERMINANT: U256 = U256([37, 0, 0, 0]);

View File

@ -104,6 +104,7 @@ extern crate rlp;
extern crate hash;
extern crate heapsize;
extern crate ansi_term;
extern crate semantic_version;
#[macro_use]
extern crate rlp_derive;

View File

@ -0,0 +1,6 @@
[package]
name = "semantic_version"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]

View File

@ -20,8 +20,8 @@
///
/// # Example
/// ```
/// extern crate ethcore_util as util;
/// use util::semantic_version::*;
/// extern crate semantic_version;
/// use semantic_version::*;
///
/// fn main() {
/// assert_eq!(SemanticVersion::new(1, 2, 3).as_u32(), 0x010203);

View File

@ -128,7 +128,6 @@ pub mod triehash;
pub mod trie;
pub mod nibbleslice;
pub mod nibblevec;
pub mod semantic_version;
pub mod snappy;
pub mod cache;
@ -139,7 +138,6 @@ pub use overlaydb::*;
pub use journaldb::JournalDB;
pub use triehash::*;
pub use trie::{Trie, TrieMut, TrieDB, TrieDBMut, TrieFactory, TrieError, SecTrieDB, SecTrieDBMut};
pub use semantic_version::*;
pub use kvdb::*;
pub use error::*;
pub use bytes::*;