File tree 4 files changed +12
-11
lines changed
4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ jobs:
10
10
name : Default features
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
14
14
- name : Format
15
15
run : cargo fmt --all -- --check
16
16
- name : Clippy
17
- run : cargo clippy -- -D warnings
17
+ run : cargo clippy --all-targets -- -D warnings
18
18
- name : Doc
19
- run : cargo doc
19
+ run : RUSTDOCFLAGS="-D warnings" cargo doc
20
20
- name : Build
21
21
run : cargo build --verbose
22
22
- name : Run tests
@@ -26,13 +26,13 @@ jobs:
26
26
name : No features
27
27
runs-on : ubuntu-latest
28
28
steps :
29
- - uses : actions/checkout@v2
29
+ - uses : actions/checkout@v4
30
30
- name : Format
31
31
run : cargo fmt --all -- --check
32
32
- name : Clippy
33
- run : cargo clippy --no-default-features -- -D warnings
33
+ run : cargo clippy --all-targets -- no-default-features -- -D warnings
34
34
- name : Doc
35
- run : cargo doc
35
+ run : RUSTDOCFLAGS="-D warnings" cargo doc
36
36
- name : Build
37
37
run : cargo build --no-default-features --verbose
38
38
- name : Run tests
Original file line number Diff line number Diff line change @@ -676,7 +676,7 @@ mod test {
676
676
30 31 32 33 34 35 36 37"
677
677
) ;
678
678
679
- static MULTIPLE_FRAGMENTS : [ & ' static [ u8 ] ; 3 ] = [ & FRAGMENT0 , & FRAGMENT1 , & FRAGMENT2 ] ;
679
+ static MULTIPLE_FRAGMENTS : [ & [ u8 ] ; 3 ] = [ & FRAGMENT0 , & FRAGMENT1 , & FRAGMENT2 ] ;
680
680
681
681
#[ test]
682
682
fn single_fragment_defrag ( ) {
@@ -861,7 +861,7 @@ mod proptests {
861
861
// twice in order to flush a partial BBHEADER left
862
862
// by the garbage.
863
863
assert!( times_called. get( ) <= garbage_data. len( ) + 2 ) ;
864
- if times_called. get( ) >= garbage_data. len( ) + 1 {
864
+ if times_called. get( ) > garbage_data. len( ) {
865
865
assert_eq!( bbframe, Bytes :: from_static( & SINGLE_FRAGMENT ) ) ;
866
866
}
867
867
}
@@ -894,7 +894,7 @@ mod proptests {
894
894
while times_called. get( ) <= garbage_data. len( ) {
895
895
if let Ok ( bbframe) = recv. get_bbframe( ) {
896
896
assert!( times_called. get( ) <= garbage_data. len( ) + 1 ) ;
897
- if times_called. get( ) >= garbage_data. len( ) + 1 {
897
+ if times_called. get( ) > garbage_data. len( ) {
898
898
assert_eq!( bbframe, Bytes :: from_static( & SINGLE_FRAGMENT ) ) ;
899
899
}
900
900
}
Original file line number Diff line number Diff line change @@ -539,7 +539,8 @@ mod proptests {
539
539
header. protocol_type( ) ;
540
540
if let Some ( label) = header. label( ) {
541
541
label. as_slice( ) ;
542
- assert_eq!( label. is_empty( ) , label. len( ) == 0 ) ;
542
+ let len = label. len( ) ;
543
+ assert_eq!( label. is_empty( ) , len == 0 ) ;
543
544
}
544
545
assert!( header. len( ) >= 3 ) ;
545
546
assert!( !header. is_empty( ) ) ;
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ mod proptests {
379
379
fn defrag_garbage( garbage_bbframes in garbage( ) ) {
380
380
let mut defrag = GSEPacketDefrag :: new( ) ;
381
381
for bbframe in & garbage_bbframes {
382
- if let Ok ( pdus) = defrag. defragment( & bbframe) {
382
+ if let Ok ( pdus) = defrag. defragment( bbframe) {
383
383
for pdu in pdus {
384
384
pdu. data( ) ;
385
385
pdu. protocol_type( ) ;
You can’t perform that action at this time.
0 commit comments