File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1578,7 +1578,7 @@ impl From<Expiry> for tower_sessions::Expiry {
15781578 Expiry :: OnSessionEnd => Self :: OnSessionEnd ,
15791579 Expiry :: OnInactivity ( duration) => {
15801580 Self :: OnInactivity ( time:: Duration :: try_from ( duration) . unwrap_or_else ( |e| {
1581- panic ! ( "could not convert {duration:?} into a valid time::Duration: {e:?}" , )
1581+ panic ! ( "could not convert {duration:?} into a valid time::Duration: {e:?}" )
15821582 } ) )
15831583 }
15841584 Expiry :: AtDateTime ( time) => {
Original file line number Diff line number Diff line change @@ -1180,11 +1180,9 @@ impl Database {
11801180 } ) ;
11811181 }
11821182
1183- let batch_size = if num_value_fields > 0 {
1184- max_params / num_value_fields
1185- } else {
1186- return Err ( DatabaseError :: BulkInsertNoValueColumns ) ;
1187- } ;
1183+ let batch_size = max_params
1184+ . checked_div ( num_value_fields)
1185+ . ok_or ( DatabaseError :: BulkInsertNoValueColumns ) ?;
11881186
11891187 for chunk in data. chunks_mut ( batch_size) {
11901188 self . bulk_insert_chunk (
Original file line number Diff line number Diff line change @@ -36,11 +36,7 @@ impl PathMatcher {
3636 . chain ( [ None ] )
3737 . enumerate ( )
3838 . peekable ( ) ;
39- loop {
40- let Some ( ( index, ch) ) = char_iter. next ( ) else {
41- break ;
42- } ;
43-
39+ while let Some ( ( index, ch) ) = char_iter. next ( ) {
4440 match ( ch, state) {
4541 ( Some ( '{' ) | None , State :: Literal { start } ) => {
4642 let literal = & path_pattern[ start..index] ;
You can’t perform that action at this time.
0 commit comments