Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
andreea-popescu-reef committed Sep 15, 2024
1 parent 86c636a commit 149b9d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pallets/subtensor/src/subnets/uids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ impl<T: Config> Pallet<T> {
N: From<u8>,
{
move |vec: &mut Vec<N>| {
if vec.len() > position as usize {
vec[position as usize] = N::from(0);
};
if let Some(element) = vec.get_mut(position as usize) {
*element = N::from(0);
}
}
}

Expand Down

0 comments on commit 149b9d2

Please sign in to comment.