Run cargo fmt on the whole code base (#9394)

* Run cargo fmt on the whole code base

* Second run

* Add CI check

* Fix compilation

* More unnecessary braces

* Handle weights

* Use --all

* Use correct attributes...

* Fix UI tests

* AHHHHHHHHH

* 🤦

* Docs

* Fix compilation

* 🤷

* Please stop

* 🤦 x 2

* More

* make rustfmt.toml consistent with polkadot

Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Bastian Köcher
2021-07-21 16:32:32 +02:00
committed by GitHub
parent d451c38c1c
commit 7b56ab15b4
1010 changed files with 53339 additions and 51208 deletions
+3 -9
View File
@@ -59,21 +59,17 @@ pub fn make_transcript(data: VRFTranscriptData) -> Transcript {
},
VRFTranscriptValue::U64(val) => {
transcript.append_u64(label.as_bytes(), val);
}
},
}
}
transcript
}
#[cfg(test)]
mod tests {
use super::*;
use rand::RngCore;
use rand_chacha::{
rand_core::SeedableRng,
ChaChaRng,
};
use rand_chacha::{rand_core::SeedableRng, ChaChaRng};
#[test]
fn transcript_creation_matches() {
@@ -90,9 +86,7 @@ mod tests {
});
let test = |t: Transcript| -> [u8; 16] {
let mut b = [0u8; 16];
t.build_rng()
.finalize(&mut ChaChaRng::from_seed([0u8;32]))
.fill_bytes(&mut b);
t.build_rng().finalize(&mut ChaChaRng::from_seed([0u8; 32])).fill_bytes(&mut b);
b
};
debug_assert!(test(orig_transcript) == test(new_transcript));