File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed
bon-sandbox/src/docs_comparison Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ implicit_clone = "warn"
6969implicit_saturating_sub = " warn"
7070imprecise_flops = " warn"
7171index_refutable_slice = " warn"
72+ indexing_slicing = " warn"
7273invalid_upcast_comparisons = " warn"
7374iter_not_returning_iterator = " warn"
7475iter_on_empty_collections = " warn"
@@ -81,7 +82,6 @@ manual_instant_elapsed = "warn"
8182manual_ok_or = " warn"
8283many_single_char_names = " warn"
8384map_flatten = " warn"
84- match_on_vec_items = " warn"
8585match_wild_err_arm = " warn"
8686maybe_infinite_iter = " warn"
8787mixed_read_write_in_expression = " warn"
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ impl<T> VecExt<T> for Vec<T> {
1010 fn try_retain_mut ( & mut self , mut try_predicate : impl FnMut ( & mut T ) -> Result < bool > ) -> Result {
1111 let mut i = 0 ;
1212 while i < self . len ( ) {
13- if try_predicate ( & mut self [ i ] ) ? {
13+ if try_predicate ( self . get_mut ( i ) . expect ( "BUG: index must be valid" ) ) ? {
1414 i += 1 ;
1515 } else {
1616 self . remove ( i) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ pub mod bon {
3131/// Example docs generated with `buildstructor`
3232// This lint comes from buildstructor-generated code
3333#[ expect( elided_lifetimes_in_paths) ]
34+ // This lint comes from nightly
35+ #[ allow( unknown_lints, mismatched_lifetime_syntaxes) ]
3436pub mod buildstructor {
3537
3638 /// Doc comment on `Struct`
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ macro_rules! arr {
7373
7474#[ cfg( test) ]
7575mod tests {
76+ // It's okay to use indexing in tests for conciseness.
77+ #![ allow( clippy:: indexing_slicing) ]
78+
7679 #[ cfg( feature = "alloc" ) ]
7780 use crate :: __:: alloc:: { string:: String , vec:: Vec } ;
7881 use core:: num:: NonZeroU8 ;
You can’t perform that action at this time.
0 commit comments