summaryrefslogtreecommitdiff
path: root/src/dev/update.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-05-01 19:47:35 +0200
committermo8it <mo8it@proton.me>2024-05-01 19:47:35 +0200
commit5e7afce019325226c7515fe9cb462dda2685f7a3 (patch)
tree14cf4371c766a7168f71294dbaff1e033514ccae /src/dev/update.rs
parent74180ba1cccb69cecb94932795ebd8743fa42a6c (diff)
Document dev
Diffstat (limited to 'src/dev/update.rs')
-rw-r--r--src/dev/update.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dev/update.rs b/src/dev/update.rs
index fe7622c..66efe3d 100644
--- a/src/dev/update.rs
+++ b/src/dev/update.rs
@@ -1,6 +1,5 @@
-use std::fs;
-
use anyhow::{Context, Result};
+use std::fs;
use crate::{
cargo_toml::updated_cargo_toml,
@@ -8,6 +7,7 @@ use crate::{
DEBUG_PROFILE,
};
+// Update the `Cargo.toml` file.
fn update_cargo_toml(
exercise_infos: &[ExerciseInfo],
current_cargo_toml: &str,
@@ -26,6 +26,7 @@ fn update_cargo_toml(
pub fn update() -> Result<()> {
let info_file = InfoFile::parse()?;
+ // A hack to make `cargo run -- dev update` work when developing Rustlings.
if DEBUG_PROFILE {
update_cargo_toml(
&info_file.exercises,