fix formatting according to rustfmt

This commit is contained in:
Ding Xiang Fei
2018-05-24 13:37:59 +08:00
committed by Romain Ruetschi
parent 7a1add13a1
commit 7befdf94a2
3 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,8 @@
#![deny(missing_docs, unused_qualifications, missing_debug_implementations,
missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code,
unstable_features, unused_import_braces)]
#![deny(
missing_docs, unused_qualifications, missing_debug_implementations,
missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code,
unstable_features, unused_import_braces
)]
//! *merkle* implements a Merkle Tree in Rust.

View File

@ -28,7 +28,9 @@ pub struct MerkleTree<T> {
impl<T: PartialEq> PartialEq for MerkleTree<T> {
#[allow(trivial_casts)]
fn eq(&self, other: &MerkleTree<T>) -> bool {
self.root == other.root && self.height == other.height && self.count == other.count
self.root == other.root
&& self.height == other.height
&& self.count == other.count
&& (self.algorithm as *const Algorithm) == (other.algorithm as *const Algorithm)
}
}

View File

@ -52,8 +52,10 @@ mod algorithm_serde {
mod test {
use super::*;
use ring::digest::{SHA1 as sha1, SHA256 as sha256, SHA384 as sha384, SHA512 as sha512,
SHA512_256 as sha512_256};
use ring::digest::{
SHA1 as sha1, SHA256 as sha256, SHA384 as sha384, SHA512 as sha512,
SHA512_256 as sha512_256,
};
static SHA1: &Algorithm = &sha1;
static SHA256: &Algorithm = &sha256;