@@ -90,7 +90,7 @@ impl RankedVote {
90
90
let decoded =
91
91
bs58:: decode ( & self . memo ) . into_vec ( ) . with_context ( || format ! ( "failed to decode memo {} - bs58" , & self . memo) ) ?;
92
92
93
- let value = & decoded[ 3 .. decoded[ 2 ] as usize + 3 ] ;
93
+ let value = & decoded[ 3 .. decoded[ 2 ] as usize + 3 ] ;
94
94
95
95
let result =
96
96
String :: from_utf8 ( value. to_vec ( ) ) . with_context ( || format ! ( "failed to decode memo {} - from_utf8" , & self . memo) ) ?;
@@ -1001,13 +1001,13 @@ fn advance_voting(
1001
1001
if let Some ( ( idx, cid) ) = first_candidate {
1002
1002
// A valid candidate was found, but still look in the initial slice to find if
1003
1003
// some overvote or multiple blanks occured.
1004
- let initial_slice = & choices[ .. idx] ;
1004
+ let initial_slice = & choices[ ..idx] ;
1005
1005
1006
1006
if check_advance_rules ( initial_slice, duplicate_policy, overvote, skipped_ranks) . is_some ( ) {
1007
1007
return None ;
1008
1008
}
1009
1009
1010
- let final_slice = & choices[ idx + 1 ..] ;
1010
+ let final_slice = & choices[ idx + 1 ..] ;
1011
1011
Some ( ( * cid, final_slice. to_vec ( ) ) )
1012
1012
} else {
1013
1013
None
@@ -1031,14 +1031,14 @@ fn advance_voting_initial(
1031
1031
if let Some ( idx) = first_candidate {
1032
1032
// A valid candidate was found, but still look in the initial slice to find if
1033
1033
// some overvote or multiple blanks occured.
1034
- let initial_slice = & choices[ .. idx] ;
1034
+ let initial_slice = & choices[ ..idx] ;
1035
1035
1036
1036
if check_advance_rules ( initial_slice, duplicate_policy, overvote, skipped_ranks) . is_some ( ) {
1037
1037
return None ;
1038
1038
}
1039
1039
1040
1040
// This final slice includes the pivot element.
1041
- let final_slice = & choices[ idx ..] ;
1041
+ let final_slice = & choices[ idx..] ;
1042
1042
Some ( final_slice. to_vec ( ) )
1043
1043
} else {
1044
1044
None
@@ -1108,7 +1108,7 @@ fn checks(coll: &[Ballot], reg_candidates: &[Candidate], rules: &VoteRules) -> R
1108
1108
if let Some ( initial_advance) = initial_advance_opt {
1109
1109
// Check the head of the ballot.
1110
1110
if let Some ( Choice :: Filled ( cid) ) = initial_advance. first ( ) {
1111
- let candidates = RankedVoteCandidates { first_valid : * cid, rest : initial_advance[ 1 ..] . to_vec ( ) } ;
1111
+ let candidates = RankedVoteCandidates { first_valid : * cid, rest : initial_advance[ 1 ..] . to_vec ( ) } ;
1112
1112
validated_votes. push ( VoteInternal { candidates, count } ) ;
1113
1113
} else if let Some ( Choice :: Undeclared ) = initial_advance. first ( ) {
1114
1114
// Valid and first choice is undeclared. See if the rest is a valid vote.
0 commit comments