diff options
| author | mo8it <mo8it@proton.me> | 2024-04-01 18:52:43 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-01 18:52:43 +0200 |
| commit | 190945352a2316154d9856a5d882893326e0136a (patch) | |
| tree | 3865b4b4c4848ff5bfd09727bd2fea29560cb286 | |
| parent | def8d2c569a8a637396960c8513a0b1bdf88ef0c (diff) | |
Add comments about dev/Cargo.toml
| -rw-r--r-- | dev/Cargo.toml | 3 | ||||
| -rw-r--r-- | src/bin/gen-dev-cargo-toml.rs | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/dev/Cargo.toml b/dev/Cargo.toml index 4ad4886..e4e7be7 100644 --- a/dev/Cargo.toml +++ b/dev/Cargo.toml @@ -1,3 +1,6 @@ +# This file is a hack to allow using `cargo r` to test `rustlings` during development. +# You shouldn't edit it manually. It is created and updated by running `cargo run --bin gen-dev-cargo-toml`. + bin = [ { name = "intro1", path = "../exercises/00_intro/intro1.rs" }, { name = "intro2", path = "../exercises/00_intro/intro2.rs" }, diff --git a/src/bin/gen-dev-cargo-toml.rs b/src/bin/gen-dev-cargo-toml.rs index 20167a1..65cc244 100644 --- a/src/bin/gen-dev-cargo-toml.rs +++ b/src/bin/gen-dev-cargo-toml.rs @@ -1,3 +1,7 @@ +// Generates `dev/Cargo.toml` such that it is synced with `info.toml`. +// `dev/Cargo.toml` is a hack to allow using `cargo r` to test `rustlings` +// during development. + use anyhow::{bail, Context, Result}; use serde::Deserialize; use std::{ @@ -25,7 +29,12 @@ fn main() -> Result<()> { let mut buf = Vec::with_capacity(1 << 14); - buf.extend_from_slice(b"bin = [\n"); + buf.extend_from_slice( + b"# This file is a hack to allow using `cargo r` to test `rustlings` during development. +# You shouldn't edit it manually. It is created and updated by running `cargo run --bin gen-dev-cargo-toml`. + +bin = [\n", + ); for exercise in exercises { buf.extend_from_slice(b" { name = \""); |
