File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -18,25 +18,26 @@ jobs:
18
18
fmt :
19
19
runs-on : ubuntu-latest
20
20
steps :
21
- - uses : actions/checkout@v3
22
- - uses : dtolnay/rust-toolchain@stable
23
- with :
24
- components : rustfmt
25
- - uses : DavidAnson/markdownlint-cli2-action@v9
21
+ - uses : actions/checkout@v4
22
+ - uses : DavidAnson/markdownlint-cli2-action@v16
26
23
with :
27
24
globs : " exercises/**/*.md"
28
25
- name : Run cargo fmt
29
- run : |
30
- cargo fmt --all -- --check
26
+ run : cargo fmt --all -- --check
31
27
test :
32
28
runs-on : ${{ matrix.os }}
33
29
strategy :
34
30
matrix :
35
31
os : [ubuntu-latest, windows-latest, macOS-latest]
36
32
steps :
37
- - uses : actions/checkout@v3
38
- - uses : dtolnay/rust-toolchain@stable
33
+ - uses : actions/checkout@v4
39
34
- uses : swatinem/rust-cache@v2
40
35
- name : Run cargo test
41
- run : |
42
- cargo test
36
+ run : cargo test
37
+ dev-check :
38
+ runs-on : ubuntu-latest
39
+ steps :
40
+ - uses : actions/checkout@v4
41
+ - uses : swatinem/rust-cache@v2
42
+ - name : Run rustlings dev check
43
+ run : cargo run -- dev check
Original file line number Diff line number Diff line change 54
54
runs-on : ubuntu-latest
55
55
steps :
56
56
# Setup
57
- - uses : actions/checkout@v3
57
+ - uses : actions/checkout@v4
58
58
with :
59
59
fetch-depth : 0
60
- - uses : dtolnay/rust-toolchain@stable
61
60
- uses : swatinem/rust-cache@v2
62
61
63
62
# If you use any mdbook plugins, here's the place to install them!
Original file line number Diff line number Diff line change 4
4
// `hour_of_day` is higher than 23.
5
5
fn maybe_icecream ( hour_of_day : u16 ) -> Option < u16 > {
6
6
match hour_of_day {
7
- 0 ..22 => Some ( 5 ) ,
8
- 22 ..24 => Some ( 0 ) ,
7
+ 0 ..= 21 => Some ( 5 ) ,
8
+ 22 ..= 23 => Some ( 0 ) ,
9
9
_ => None ,
10
10
}
11
11
}
You can’t perform that action at this time.
0 commit comments