mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-06-05 21:44:47 +00:00
Add dev alias
Some checks failed
Rustlings Tests / clippy (push) Has been cancelled
Rustlings Tests / fmt (push) Has been cancelled
Rustlings Tests / test (macos-latest) (push) Has been cancelled
Rustlings Tests / test (ubuntu-latest) (push) Has been cancelled
Rustlings Tests / test (windows-latest) (push) Has been cancelled
Rustlings Tests / dev-check (push) Has been cancelled
Web / Build and deploy site and docs (push) Has been cancelled
Some checks failed
Rustlings Tests / clippy (push) Has been cancelled
Rustlings Tests / fmt (push) Has been cancelled
Rustlings Tests / test (macos-latest) (push) Has been cancelled
Rustlings Tests / test (ubuntu-latest) (push) Has been cancelled
Rustlings Tests / test (windows-latest) (push) Has been cancelled
Rustlings Tests / dev-check (push) Has been cancelled
Web / Build and deploy site and docs (push) Has been cancelled
This commit is contained in:
parent
8dff0df266
commit
e73fff3bd4
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[alias]
|
||||||
|
dev = ["run", "--", "dev"]
|
@ -1,4 +1,4 @@
|
|||||||
# Don't edit the `bin` list manually! It is updated by `cargo run -- dev update`. This comment line will be stripped in `rustlings init`.
|
# Don't edit the `bin` list manually! It is updated by `cargo dev update`. This comment line will be stripped in `rustlings init`.
|
||||||
bin = [
|
bin = [
|
||||||
{ name = "intro1", path = "../exercises/00_intro/intro1.rs" },
|
{ name = "intro1", path = "../exercises/00_intro/intro1.rs" },
|
||||||
{ name = "intro1_sol", path = "../solutions/00_intro/intro1.rs" },
|
{ name = "intro1_sol", path = "../solutions/00_intro/intro1.rs" },
|
||||||
|
@ -43,7 +43,7 @@ fn check_cargo_toml(
|
|||||||
if old_bins != new_bins {
|
if old_bins != new_bins {
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
bail!(
|
bail!(
|
||||||
"The file `dev/Cargo.toml` is outdated. Run `cargo run -- dev update` to update it. Then run `cargo run -- dev check` again"
|
"The file `dev/Cargo.toml` is outdated. Run `cargo dev update` to update it. Then run `cargo run -- dev check` again"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ pub fn check(require_solutions: bool) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
// A hack to make `cargo run -- dev check` work when developing Rustlings.
|
// A hack to make `cargo dev check` work when developing Rustlings.
|
||||||
check_cargo_toml(&info_file.exercises, "dev/Cargo.toml", b"../")?;
|
check_cargo_toml(&info_file.exercises, "dev/Cargo.toml", b"../")?;
|
||||||
} else {
|
} else {
|
||||||
check_cargo_toml(&info_file.exercises, "Cargo.toml", b"")?;
|
check_cargo_toml(&info_file.exercises, "Cargo.toml", b"")?;
|
||||||
|
@ -28,7 +28,7 @@ pub fn update() -> Result<()> {
|
|||||||
let info_file = InfoFile::parse()?;
|
let info_file = InfoFile::parse()?;
|
||||||
|
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
// A hack to make `cargo run -- dev update` work when developing Rustlings.
|
// A hack to make `cargo dev update` work when developing Rustlings.
|
||||||
update_cargo_toml(&info_file.exercises, "dev/Cargo.toml", b"../")
|
update_cargo_toml(&info_file.exercises, "dev/Cargo.toml", b"../")
|
||||||
.context("Failed to update the file `dev/Cargo.toml`")?;
|
.context("Failed to update the file `dev/Cargo.toml`")?;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user