Skip to content

Commit

Permalink
Drop dev-dependencies table
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Dec 9, 2024
1 parent 77bf63a commit 9b05be2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ fn get_rustc_packages(target_crates: &[RustcApCrate], dst: &Path) -> Vec<RustcPa
let mut toml = toml.parse::<toml_edit::Document>().unwrap();

(|| {
_ = toml.remove("dev-dependencies");
let item = &toml
.get_mut("features")?
.as_table_like_mut()?
Expand All @@ -179,9 +180,12 @@ fn get_rustc_packages(target_crates: &[RustcApCrate], dst: &Path) -> Vec<RustcPa
}
}
for dep in res {
toml.get_mut("dependencies")?
.as_table_like_mut()?
.remove(&dep);
if let Some(deps) = toml
.get_mut("dependencies")
.and_then(|it| it.as_table_like_mut())
{
deps.remove(&dep);
}
}
Some(())
})();
Expand Down

0 comments on commit 9b05be2

Please sign in to comment.