Include dev/Cargo.toml

This commit is contained in:
mo8it 2024-04-25 19:58:55 +02:00
parent aaea5b490f
commit 5920a58e83
5 changed files with 11 additions and 8 deletions

View file

@ -37,12 +37,14 @@ keywords = [
"learning", "learning",
] ]
include = [ include = [
"/exercises/",
"/info.toml",
"/LICENSE",
"/README.md",
"/solutions/",
"/src/", "/src/",
"/exercises/",
"/solutions/",
"/info.toml",
# A symlink to be able to include `dev/Cargo.toml` although `dev` is excluded.
"/dev-Cargo.toml",
"/README.md",
"/LICENSE",
] ]
[dependencies] [dependencies]

1
dev-Cargo.toml Symbolic link
View file

@ -0,0 +1 @@
dev/Cargo.toml

View file

@ -166,7 +166,7 @@ pub fn check() -> Result<()> {
if DEBUG_PROFILE { if DEBUG_PROFILE {
check_cargo_toml( check_cargo_toml(
&info_file.exercises, &info_file.exercises,
include_str!("../../dev/Cargo.toml"), include_str!("../../dev-Cargo.toml"),
b"../", b"../",
)?; )?;
} else { } else {

View file

@ -29,7 +29,7 @@ pub fn update() -> Result<()> {
if DEBUG_PROFILE { if DEBUG_PROFILE {
update_cargo_toml( update_cargo_toml(
&info_file.exercises, &info_file.exercises,
include_str!("../../dev/Cargo.toml"), include_str!("../../dev-Cargo.toml"),
b"../", b"../",
"dev/Cargo.toml", "dev/Cargo.toml",
) )

View file

@ -31,7 +31,7 @@ pub fn init() -> Result<()> {
.init_exercises_dir(&info_file.exercises) .init_exercises_dir(&info_file.exercises)
.context("Failed to initialize the `rustlings/exercises` directory")?; .context("Failed to initialize the `rustlings/exercises` directory")?;
let current_cargo_toml = include_str!("../dev/Cargo.toml"); let current_cargo_toml = include_str!("../dev-Cargo.toml");
// Skip the first line (comment). // Skip the first line (comment).
let newline_ind = current_cargo_toml let newline_ind = current_cargo_toml
.as_bytes() .as_bytes()