mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-25 09:31:08 +00:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user