File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,22 @@ jobs:
21
21
- name : Install Rust
22
22
run : rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
23
23
- run : cargo test
24
+
25
+ doc_fmt :
26
+ name : Document and check formatting
27
+ runs-on : ubuntu-24.04
28
+ steps :
29
+ - uses : actions/checkout@master
30
+ - name : Install Rust
31
+ run : |
32
+ rustup update nightly
33
+ rustup default nightly
34
+ rustup component add rustfmt
24
35
- run : cargo doc
36
+ - run : cargo fmt --check
25
37
26
38
msrv :
27
- runs-on : ubuntu-latest
39
+ runs-on : ubuntu-24.04
28
40
steps :
29
41
- uses : actions/checkout@master
30
42
- name : Install Rust
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ fn test_free_trailing_only() {
248
248
249
249
#[ test]
250
250
fn test_free_trailing_args ( ) {
251
- let args = vec ! [ "pre" . to_owned( ) , "--" . to_owned( ) , "post" . to_owned( ) ] ;
251
+ let args = vec ! [ "pre" . to_owned( ) , "--" . to_owned( ) , "post" . to_owned( ) ] ;
252
252
match Options :: new ( ) . parse ( & args) {
253
253
Ok ( ref m) => {
254
254
assert_eq ! ( m. free_trailing_start( ) , Some ( 1 ) ) ;
@@ -741,10 +741,7 @@ fn test_multi() {
741
741
) ;
742
742
743
743
assert_eq ! ( matches_both. opts_str_first( & [ "e" ] ) . unwrap( ) , "foo" ) ;
744
- assert_eq ! (
745
- matches_both. opts_str_first( & [ "encrypt" ] ) . unwrap( ) ,
746
- "bar"
747
- ) ;
744
+ assert_eq ! ( matches_both. opts_str_first( & [ "encrypt" ] ) . unwrap( ) , "bar" ) ;
748
745
assert_eq ! (
749
746
matches_both. opts_str_first( & [ "e" , "encrypt" ] ) . unwrap( ) ,
750
747
"foo"
You can’t perform that action at this time.
0 commit comments