Skip to content
Snippets Groups Projects
Commit a9dde429 authored by Éloïs's avatar Éloïs
Browse files

[ref] remove unused crates & delete some useless code

parent 08eee93c
Branches
Tags
No related merge requests found
...@@ -220,10 +220,8 @@ dependencies = [ ...@@ -220,10 +220,8 @@ dependencies = [
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "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)", "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)", "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 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)", "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)", "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)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -286,9 +284,7 @@ dependencies = [ ...@@ -286,9 +284,7 @@ dependencies = [
"duniter-module 0.1.0-a0.1", "duniter-module 0.1.0-a0.1",
"duniter-network 0.1.0-a0.1", "duniter-network 0.1.0-a0.1",
"durs-wot 0.8.0-a0.9", "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)", "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)", "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)", "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 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -304,8 +300,6 @@ dependencies = [ ...@@ -304,8 +300,6 @@ dependencies = [
"base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"duniter-crypto 0.2.0-a0.1", "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 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)", "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)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -603,11 +597,6 @@ dependencies = [ ...@@ -603,11 +597,6 @@ dependencies = [
"vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "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]] [[package]]
name = "log" name = "log"
version = "0.4.2" version = "0.4.2"
...@@ -1270,7 +1259,6 @@ dependencies = [ ...@@ -1270,7 +1259,6 @@ dependencies = [
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "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 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 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 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 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" "checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43"
......
...@@ -22,10 +22,8 @@ durs-wot = { path = "../wot" } ...@@ -22,10 +22,8 @@ durs-wot = { path = "../wot" }
log = "0.4.*" log = "0.4.*"
num_cpus = "1.8.*" num_cpus = "1.8.*"
pbr = "1.0.*" pbr = "1.0.*"
rand = "0.4.*"
rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]} rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]}
serde = "1.0.*" serde = "1.0.*"
serde_derive = "1.0.*"
serde_json = "1.0.*" serde_json = "1.0.*"
sqlite = "0.23.*" sqlite = "0.23.*"
threadpool = "1.7.*" threadpool = "1.7.*"
\ No newline at end of file
...@@ -43,7 +43,6 @@ extern crate duniter_network; ...@@ -43,7 +43,6 @@ extern crate duniter_network;
extern crate durs_network_documents; extern crate durs_network_documents;
extern crate durs_wot; extern crate durs_wot;
extern crate serde; extern crate serde;
extern crate serde_json;
extern crate sqlite; extern crate sqlite;
mod apply_valid_block; mod apply_valid_block;
......
...@@ -14,9 +14,7 @@ duniter-documents = { path = "../documents" } ...@@ -14,9 +14,7 @@ duniter-documents = { path = "../documents" }
duniter-module = { path = "../module" } duniter-module = { path = "../module" }
duniter-network = { path = "../network" } duniter-network = { path = "../network" }
durs-wot = { path = "../wot" } durs-wot = { path = "../wot" }
lazy_static = "1.0.*"
log = "0.4.*" log = "0.4.*"
rand = "0.4.*"
rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]} rustbreak = {version = "2.0.0-rc2", features = ["bin_enc"]}
rust-crypto = "0.2.*" rust-crypto = "0.2.*"
serde = "1.0.*" serde = "1.0.*"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#[macro_use] #[macro_use]
extern crate log; extern crate log;
#[macro_use]
extern crate serde_json; extern crate serde_json;
#[macro_use] #[macro_use]
extern crate serde_derive; extern crate serde_derive;
...@@ -440,10 +439,6 @@ pub struct WotStats { ...@@ -440,10 +439,6 @@ pub struct WotStats {
pub centralities: Vec<u64>, pub centralities: Vec<u64>,
}*/ }*/
fn _use_json_macro() -> serde_json::Value {
json!({})
}
/// Open Rustbreak memory database /// Open Rustbreak memory database
pub fn open_memory_db<D: Serialize + DeserializeOwned + Debug + Default + Clone + Send>( pub fn open_memory_db<D: Serialize + DeserializeOwned + Debug + Default + Clone + Send>(
) -> Result<MemoryDatabase<D, Bincode>, DALError> { ) -> Result<MemoryDatabase<D, Bincode>, DALError> {
......
...@@ -13,13 +13,11 @@ ...@@ -13,13 +13,11 @@
// You should have received a copy of the GNU Affero General Public License // 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/>. // 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_crypto::keys::*;
use duniter_documents::v10::certification::{CertificationDocument, CompactCertificationDocument}; use duniter_documents::v10::certification::{CertificationDocument, CompactCertificationDocument};
use duniter_documents::v10::TextDocumentFormat; use duniter_documents::v10::TextDocumentFormat;
use duniter_documents::BlockId; use duniter_documents::BlockId;
use serde_json;
/// Parse array of certification json documents into vector of `CompactCertificationDocument` /// Parse array of certification json documents into vector of `CompactCertificationDocument`
pub fn parse_certifications_into_compact( pub fn parse_certifications_into_compact(
......
...@@ -13,18 +13,17 @@ ...@@ -13,18 +13,17 @@
// You should have received a copy of the GNU Affero General Public License // 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/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
extern crate serde_json;
use duniter_crypto::keys::*; use duniter_crypto::keys::*;
use duniter_documents::v10::revocation::{CompactRevocationDocument, RevocationDocument}; use duniter_documents::v10::revocation::{CompactRevocationDocument, RevocationDocument};
use duniter_documents::v10::TextDocumentFormat; use duniter_documents::v10::TextDocumentFormat;
use serde_json;
/// Parse array of revocations json documents into vector of `CompactRevocationDocument` /// Parse array of revocations json documents into vector of `CompactRevocationDocument`
pub fn parse_revocations_into_compact( pub fn parse_revocations_into_compact(
json_recocations: &[serde_json::Value], json_revocations: &[serde_json::Value],
) -> Vec<TextDocumentFormat<RevocationDocument>> { ) -> Vec<TextDocumentFormat<RevocationDocument>> {
let mut revocations: Vec<TextDocumentFormat<RevocationDocument>> = Vec::new(); 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 let revocations_datas: Vec<&str> = revocation
.as_str() .as_str()
.expect("Receive block in wrong format !") .expect("Receive block in wrong format !")
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
// You should have received a copy of the GNU Affero General Public License // 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/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
extern crate serde;
extern crate serde_json;
use currency_params::CurrencyParameters; use currency_params::CurrencyParameters;
use duniter_crypto::keys::*; use duniter_crypto::keys::*;
use duniter_documents::v10::certification::CompactCertificationDocument; use duniter_documents::v10::certification::CompactCertificationDocument;
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
// You should have received a copy of the GNU Affero General Public License // 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/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
extern crate serde;
extern crate serde_json;
use block::DALBlock; use block::DALBlock;
use currency_params::CurrencyParameters; use currency_params::CurrencyParameters;
use duniter_crypto::keys::PubKey; use duniter_crypto::keys::PubKey;
......
...@@ -16,8 +16,6 @@ base58 = "0.1.*" ...@@ -16,8 +16,6 @@ base58 = "0.1.*"
base64 = "0.9.*" base64 = "0.9.*"
byteorder = "1.2.3" byteorder = "1.2.3"
duniter-crypto = { path = "../crypto" } duniter-crypto = { path = "../crypto" }
lazy_static = "1.0.*"
linked-hash-map = "0.5.*"
pest = "2.0" pest = "2.0"
pest_derive = "2.0" pest_derive = "2.0"
rust-crypto = "0.2.*" rust-crypto = "0.2.*"
......
...@@ -31,7 +31,6 @@ extern crate base64; ...@@ -31,7 +31,6 @@ extern crate base64;
extern crate byteorder; extern crate byteorder;
extern crate crypto; extern crate crypto;
extern crate duniter_crypto; extern crate duniter_crypto;
extern crate linked_hash_map;
extern crate pest; extern crate pest;
#[macro_use] #[macro_use]
extern crate pest_derive; extern crate pest_derive;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment