diff --git a/Cargo.lock b/Cargo.lock index 04d2f85ed42dc7300fdb0a8d2e3ff628807c7367..5d99c9f4d13aa98ee2b4342138805819a2946b1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -220,10 +220,8 @@ dependencies = [ "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustbreak 2.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "sqlite 0.23.9 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -286,9 +284,7 @@ dependencies = [ "duniter-module 0.1.0-a0.1", "duniter-network 0.1.0-a0.1", "durs-wot 0.8.0-a0.9", - "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustbreak 2.0.0-rc2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", @@ -304,8 +300,6 @@ dependencies = [ "base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "duniter-crypto 0.2.0-a0.1", - "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -603,11 +597,6 @@ dependencies = [ "vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "linked-hash-map" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "log" version = "0.4.2" @@ -1270,7 +1259,6 @@ dependencies = [ "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" "checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" -"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" "checksum log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6fddaa003a65722a7fb9e26b0ce95921fe4ba590542ced664d8ce2fa26f9f3ac" "checksum log-panics 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae0136257df209261daa18d6c16394757c63e032e27aafd8b07788b051082bef" "checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" diff --git a/blockchain/Cargo.toml b/blockchain/Cargo.toml index ebe5daa816d100ea69997fc12967734e85c09d0a..321ae1329d2c4bee032ebba0b37473687a8773f7 100644 --- a/blockchain/Cargo.toml +++ b/blockchain/Cargo.toml @@ -22,10 +22,8 @@ durs-wot = { path = "../wot" } log = "0.4.*" num_cpus = "1.8.*" pbr = "1.0.*" -rand = "0.4.*" rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]} serde = "1.0.*" -serde_derive = "1.0.*" serde_json = "1.0.*" sqlite = "0.23.*" threadpool = "1.7.*" \ No newline at end of file diff --git a/blockchain/lib.rs b/blockchain/lib.rs index 75ca3e4fffa0a4a205ebac2bf766b50dddd653ca..dd1009ee5b8dc5e17448e797ed2bd97fb4557920 100644 --- a/blockchain/lib.rs +++ b/blockchain/lib.rs @@ -43,7 +43,6 @@ extern crate duniter_network; extern crate durs_network_documents; extern crate durs_wot; extern crate serde; -extern crate serde_json; extern crate sqlite; mod apply_valid_block; diff --git a/dal/Cargo.toml b/dal/Cargo.toml index 24ec294350d8780b1104bd75e68bf473511734a1..9788292a7f38e5e37759e2b9cfc11f120e3fbb7d 100644 --- a/dal/Cargo.toml +++ b/dal/Cargo.toml @@ -14,9 +14,7 @@ duniter-documents = { path = "../documents" } duniter-module = { path = "../module" } duniter-network = { path = "../network" } durs-wot = { path = "../wot" } -lazy_static = "1.0.*" log = "0.4.*" -rand = "0.4.*" rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]} rust-crypto = "0.2.*" serde = "1.0.*" diff --git a/dal/lib.rs b/dal/lib.rs index 07093a9a59880a41ba9e73f1f7e2628ca9d7fb17..0819c56fe44a4043dcda766833d2112db26264fb 100644 --- a/dal/lib.rs +++ b/dal/lib.rs @@ -32,7 +32,6 @@ #[macro_use] extern crate log; -#[macro_use] extern crate serde_json; #[macro_use] extern crate serde_derive; @@ -440,10 +439,6 @@ pub struct WotStats { pub centralities: Vec<u64>, }*/ -fn _use_json_macro() -> serde_json::Value { - json!({}) -} - /// Open Rustbreak memory database pub fn open_memory_db<D: Serialize + DeserializeOwned + Debug + Default + Clone + Send>( ) -> Result<MemoryDatabase<D, Bincode>, DALError> { diff --git a/dal/parsers/certifications.rs b/dal/parsers/certifications.rs index e575398682c7a32e5dea0efae6627a87d95b3016..378c498bd0245050032edfb7a13f992c63fb92dd 100644 --- a/dal/parsers/certifications.rs +++ b/dal/parsers/certifications.rs @@ -13,13 +13,11 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. -extern crate serde; -extern crate serde_json; - use duniter_crypto::keys::*; use duniter_documents::v10::certification::{CertificationDocument, CompactCertificationDocument}; use duniter_documents::v10::TextDocumentFormat; use duniter_documents::BlockId; +use serde_json; /// Parse array of certification json documents into vector of `CompactCertificationDocument` pub fn parse_certifications_into_compact( diff --git a/dal/parsers/revoked.rs b/dal/parsers/revoked.rs index 2b22e996e14ccd8026a8eba8d66c9874de117cc3..3ad39ccd1126d4d13bca30e27f3e973f6f897774 100644 --- a/dal/parsers/revoked.rs +++ b/dal/parsers/revoked.rs @@ -13,18 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. -extern crate serde_json; - use duniter_crypto::keys::*; use duniter_documents::v10::revocation::{CompactRevocationDocument, RevocationDocument}; use duniter_documents::v10::TextDocumentFormat; +use serde_json; /// Parse array of revocations json documents into vector of `CompactRevocationDocument` pub fn parse_revocations_into_compact( - json_recocations: &[serde_json::Value], + json_revocations: &[serde_json::Value], ) -> Vec<TextDocumentFormat<RevocationDocument>> { let mut revocations: Vec<TextDocumentFormat<RevocationDocument>> = Vec::new(); - for revocation in json_recocations.iter() { + for revocation in json_revocations.iter() { let revocations_datas: Vec<&str> = revocation .as_str() .expect("Receive block in wrong format !") diff --git a/dal/writers/certification.rs b/dal/writers/certification.rs index bb61ffe80b7ffd6c638ca3c9f66cd3c653f43ace..110212f9defd297d04e54058bb2d5d972aece1a2 100644 --- a/dal/writers/certification.rs +++ b/dal/writers/certification.rs @@ -13,9 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. -extern crate serde; -extern crate serde_json; - use currency_params::CurrencyParameters; use duniter_crypto::keys::*; use duniter_documents::v10::certification::CompactCertificationDocument; diff --git a/dal/writers/requests.rs b/dal/writers/requests.rs index 5e00a01d9076c33e5f2c7a6011a6a80b6485883b..40422fad8659bc0e1a8403bac869f0e1b12895f4 100644 --- a/dal/writers/requests.rs +++ b/dal/writers/requests.rs @@ -13,9 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. -extern crate serde; -extern crate serde_json; - use block::DALBlock; use currency_params::CurrencyParameters; use duniter_crypto::keys::PubKey; diff --git a/documents/Cargo.toml b/documents/Cargo.toml index a0633f8044ce03868f2794803e7c5b179efa1641..529506c982e69090fff61e6c860f05385ede59ff 100644 --- a/documents/Cargo.toml +++ b/documents/Cargo.toml @@ -16,8 +16,6 @@ base58 = "0.1.*" base64 = "0.9.*" byteorder = "1.2.3" duniter-crypto = { path = "../crypto" } -lazy_static = "1.0.*" -linked-hash-map = "0.5.*" pest = "2.0" pest_derive = "2.0" rust-crypto = "0.2.*" diff --git a/documents/src/lib.rs b/documents/src/lib.rs index 9ee020c3aa4625c09ee271f26064f3c97f3f53b2..bff1cc7067ebbace124e75bf65e91296508d562b 100644 --- a/documents/src/lib.rs +++ b/documents/src/lib.rs @@ -31,7 +31,6 @@ extern crate base64; extern crate byteorder; extern crate crypto; extern crate duniter_crypto; -extern crate linked_hash_map; extern crate pest; #[macro_use] extern crate pest_derive;