mirror of
https://github.com/mii443/merkle.rs.git
synced 2025-08-22 16:05:30 +00:00
revert 830b401 except changes in .gitignore,
and generate the schema before running rustfmt
This commit is contained in:
committed by
Romain Ruetschi
parent
7befdf94a2
commit
f233b5d1bc
@ -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
|
||||
|
@ -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 }
|
||||
|
27
src/lib.rs
27
src/lib.rs
@ -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;
|
||||
|
@ -1,8 +1,4 @@
|
||||
cfg_if! {
|
||||
if #[cfg(not(rustfmt))] {
|
||||
mod proof;
|
||||
}
|
||||
}
|
||||
mod proof;
|
||||
|
||||
use ring::digest::Algorithm;
|
||||
|
||||
|
Reference in New Issue
Block a user