mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-10 17:11:03 +00:00
Make clippy _a little_ more annoying (#10570)
* Clippy: +complexity * Update client/cli/src/arg_enums.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update bin/node/inspect/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update primitives/keystore/src/testing.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/elections/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Update primitives/npos-elections/fuzzer/src/reduce.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Incorporating feedback * No need for Ok * Additional * Needed slice * Wigy's suggestions on less derefs * fix count * reverting changes brought in by option_map_unit_fn * add --all-targets Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -134,12 +134,12 @@ fn discard_descendants<BlockHash: Hash, Key: Hash>(
|
||||
hash: &BlockHash,
|
||||
) -> u32 {
|
||||
let (first, mut remainder) = if let Some((first, rest)) = levels.0.split_first_mut() {
|
||||
(Some(first), (rest, &mut levels.1[..]))
|
||||
(Some(first), (rest, &mut *levels.1))
|
||||
} else {
|
||||
if let Some((first, rest)) = levels.1.split_first_mut() {
|
||||
(Some(first), (&mut levels.0[..], rest))
|
||||
(Some(first), (&mut *levels.0, rest))
|
||||
} else {
|
||||
(None, (&mut levels.0[..], &mut levels.1[..]))
|
||||
(None, (&mut *levels.0, &mut *levels.1))
|
||||
}
|
||||
};
|
||||
let mut pinned_children = 0;
|
||||
@@ -261,8 +261,7 @@ impl<BlockHash: Hash, Key: Hash> NonCanonicalOverlay<BlockHash, Key> {
|
||||
.push((to_meta_key(LAST_CANONICAL, &()), last_canonicalized.encode()));
|
||||
self.last_canonicalized = Some(last_canonicalized);
|
||||
} else if self.last_canonicalized.is_some() {
|
||||
if number < front_block_number ||
|
||||
number >= front_block_number + self.levels.len() as u64 + 1
|
||||
if number < front_block_number || number > front_block_number + self.levels.len() as u64
|
||||
{
|
||||
trace!(target: "state-db", "Failed to insert block {}, current is {} .. {})",
|
||||
number,
|
||||
|
||||
Reference in New Issue
Block a user