revert 830b401 except changes in .gitignore,

and generate the schema before running rustfmt
This commit is contained in:
Ding Xiang Fei
2018-05-25 14:04:09 +08:00
committed by Romain Ruetschi
parent 7befdf94a2
commit f233b5d1bc
4 changed files with 13 additions and 22 deletions

View File

@ -24,6 +24,7 @@ matrix:
before_script:
- rustup component add rustfmt-preview
script:
- protoc --rust-out src/proto/ protobuf/proof.proto
- cargo fmt --all -- --check
- env: NAME='kcov'
sudo: required # travis-ci/travis-ci#9061

View File

@ -18,7 +18,6 @@ categories = ["data-structures", "cryptography"]
[dependencies]
cfg-if = "0.1.3"
ring = "^0.12.0"
protobuf = { version = "1.7.1", optional = true }
serde = { version = "^1.0.55", optional = true }

View File

@ -6,25 +6,16 @@
//! *merkle* implements a Merkle Tree in Rust.
#[macro_use]
extern crate cfg_if;
extern crate ring;
cfg_if! {
if #[cfg(feature = "serialization-protobuf")] {
extern crate protobuf;
#[allow(unused_qualifications)]
mod proto;
}
}
#[cfg(feature = "serialization-protobuf")]
extern crate protobuf;
cfg_if! {
if #[cfg(feature = "serialization-serde")] {
extern crate serde;
#[macro_use]
extern crate serde_derive;
}
}
#[cfg(feature = "serialization-serde")]
extern crate serde;
#[cfg(feature = "serialization-serde")]
#[macro_use]
extern crate serde_derive;
mod merkletree;
pub use merkletree::MerkleTree;
@ -38,5 +29,9 @@ pub use hashutils::Hashable;
mod tree;
pub use tree::{LeavesIntoIterator, LeavesIterator};
#[cfg(feature = "serialization-protobuf")]
#[allow(unused_qualifications)]
mod proto;
#[cfg(test)]
mod tests;

View File

@ -1,8 +1,4 @@
cfg_if! {
if #[cfg(not(rustfmt))] {
mod proof;
}
}
mod proof;
use ring::digest::Algorithm;