diff options
| author | Mo <76752051+mo8it@users.noreply.github.com> | 2024-07-03 18:02:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-03 18:02:43 +0200 |
| commit | 0f71e122357f3f214c1d9db71f1d84c9f92adc5f (patch) | |
| tree | ca11467ca960afada13c7ba3786bc80cf73cadff | |
| parent | e5bc8588e0d6bf8d925444ebc02d271051d310cf (diff) | |
| parent | fa6b7d77b2798985bdc7d403c8f300a9c289222c (diff) | |
Merge pull request #2011 from rust-lang/ci
Update CI
| -rw-r--r-- | .github/workflows/rust.yml | 23 | ||||
| -rw-r--r-- | .github/workflows/web.yml | 3 | ||||
| -rw-r--r-- | solutions/12_options/options1.rs | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 689d05e..3705e6a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,25 +18,26 @@ jobs: fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - uses: DavidAnson/markdownlint-cli2-action@v9 + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v16 with: globs: "exercises/**/*.md" - name: Run cargo fmt - run: | - cargo fmt --all -- --check + run: cargo fmt --all -- --check test: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 - uses: swatinem/rust-cache@v2 - name: Run cargo test - run: | - cargo test + run: cargo test + dev-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: swatinem/rust-cache@v2 + - name: Run rustlings dev check + run: cargo run -- dev check diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 5d9abe4..ec5d446 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -54,10 +54,9 @@ jobs: runs-on: ubuntu-latest steps: # Setup - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@stable - uses: swatinem/rust-cache@v2 # If you use any mdbook plugins, here's the place to install them! diff --git a/solutions/12_options/options1.rs b/solutions/12_options/options1.rs index 1ffbb04..230af3a 100644 --- a/solutions/12_options/options1.rs +++ b/solutions/12_options/options1.rs @@ -4,8 +4,8 @@ // `hour_of_day` is higher than 23. fn maybe_icecream(hour_of_day: u16) -> Option<u16> { match hour_of_day { - 0..22 => Some(5), - 22..24 => Some(0), + 0..=21 => Some(5), + 22..=23 => Some(0), _ => None, } } |
