Skip to content

Commit 0f71e12

Browse files
authored
Merge pull request #2011 from rust-lang/ci
Update CI
2 parents e5bc858 + fa6b7d7 commit 0f71e12

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

.github/workflows/rust.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@ jobs:
1818
fmt:
1919
runs-on: ubuntu-latest
2020
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
2623
with:
2724
globs: "exercises/**/*.md"
2825
- name: Run cargo fmt
29-
run: |
30-
cargo fmt --all -- --check
26+
run: cargo fmt --all -- --check
3127
test:
3228
runs-on: ${{ matrix.os }}
3329
strategy:
3430
matrix:
3531
os: [ubuntu-latest, windows-latest, macOS-latest]
3632
steps:
37-
- uses: actions/checkout@v3
38-
- uses: dtolnay/rust-toolchain@stable
33+
- uses: actions/checkout@v4
3934
- uses: swatinem/rust-cache@v2
4035
- 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

.github/workflows/web.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ jobs:
5454
runs-on: ubuntu-latest
5555
steps:
5656
# Setup
57-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
5858
with:
5959
fetch-depth: 0
60-
- uses: dtolnay/rust-toolchain@stable
6160
- uses: swatinem/rust-cache@v2
6261

6362
# If you use any mdbook plugins, here's the place to install them!

solutions/12_options/options1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// `hour_of_day` is higher than 23.
55
fn maybe_icecream(hour_of_day: u16) -> Option<u16> {
66
match hour_of_day {
7-
0..22 => Some(5),
8-
22..24 => Some(0),
7+
0..=21 => Some(5),
8+
22..=23 => Some(0),
99
_ => None,
1010
}
1111
}

0 commit comments

Comments
 (0)