mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-11 03:27:23 +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:
@@ -1,6 +1,5 @@
|
||||
use honggfuzz::fuzz;
|
||||
use sp_npos_elections::generate_solution_type;
|
||||
use sp_npos_elections::sp_arithmetic::Percent;
|
||||
use sp_npos_elections::{generate_solution_type, sp_arithmetic::Percent};
|
||||
use sp_runtime::codec::{Encode, Error};
|
||||
|
||||
fn main() {
|
||||
@@ -26,9 +25,8 @@ fn main() {
|
||||
// The reencoded value should definitely be decodable (if unwrap() fails that is a valid
|
||||
// panic/finding for the fuzzer):
|
||||
let decoded2: InnerTestSolutionCompact =
|
||||
<InnerTestSolutionCompact as codec::Decode>::decode(
|
||||
&mut reencoded.as_slice(),
|
||||
).unwrap();
|
||||
<InnerTestSolutionCompact as codec::Decode>::decode(&mut reencoded.as_slice())
|
||||
.unwrap();
|
||||
// And it should be equal to the original decoded object (resulting from directly
|
||||
// decoding fuzzer_data):
|
||||
assert_eq!(decoded, decoded2);
|
||||
|
||||
Reference in New Issue
Block a user