mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-01-14 00:00:02 +03:00
Compare commits
5 commits
d176ddd27e
...
2854dc9ab3
Author | SHA1 | Date | |
---|---|---|---|
2854dc9ab3 | |||
516fcf9168 | |||
12d1971b0d | |||
3e09e509d6 | |||
99fb11cc72 |
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
|
@ -23,7 +23,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
globs: "exercises/**/*.md"
|
globs: "exercises/**/*.md"
|
||||||
- name: Run cargo fmt
|
- name: Run cargo fmt
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all --check
|
||||||
|
- name: Run rustfmt on solutions
|
||||||
|
run: rustfmt --check --edition 2021 --color always solutions/**/*.rs
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -33,7 +35,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: swatinem/rust-cache@v2
|
- uses: swatinem/rust-cache@v2
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
run: cargo test
|
run: cargo test --workspace
|
||||||
dev-check:
|
dev-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -820,9 +820,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.70"
|
version = "2.0.71"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16"
|
checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
15
README.md
15
README.md
|
@ -53,6 +53,21 @@ After installing Rustlings, run the following command to initialize the `rustlin
|
||||||
rustlings init
|
rustlings init
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>If the command <code>rustlings</code> can't be found…</strong> (<em>click to expand</em>)</summary>
|
||||||
|
|
||||||
|
You are probably using Linux and installed Rust using your package manager.
|
||||||
|
|
||||||
|
Cargo installs binaries to the directory `~/.cargo/bin`.
|
||||||
|
Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environment variable.
|
||||||
|
|
||||||
|
The solution is to …
|
||||||
|
|
||||||
|
- either add `~/.cargo/bin` manually to `PATH`
|
||||||
|
- or to uninstall Rust from the package manager and install it using the official way with `rustup`: https://www.rust-lang.org/tools/install
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
Now, go into the newly initialized directory and launch Rustlings for further instructions on getting started with the exercises:
|
Now, go into the newly initialized directory and launch Rustlings for further instructions on getting started with the exercises:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -3,7 +3,12 @@
|
||||||
# Error out if any command fails
|
# Error out if any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cargo run -- dev check
|
|
||||||
typos
|
typos
|
||||||
cargo outdated -w --exit-code 1
|
cargo upgrades
|
||||||
|
|
||||||
|
# Similar to CI
|
||||||
|
cargo clippy -- --deny warnings
|
||||||
|
cargo fmt --all --check
|
||||||
|
rustfmt --check --edition 2021 solutions/**/*.rs
|
||||||
cargo test --workspace --all-targets
|
cargo test --workspace --all-targets
|
||||||
|
cargo run -- dev check --require-solutions
|
||||||
|
|
Loading…
Reference in a new issue