Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
Do not add implicitly gathered information when modifying Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
vigoo committed Apr 6, 2024
1 parent 7591b30 commit 31cdcf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wasm-rpc-stubgen/src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ pub fn add_workspace_members(path: &Path, members: &[String]) -> anyhow::Result<
}

pub fn add_dependencies_to_cargo_toml(cargo_path: &Path, names: &[String]) -> anyhow::Result<()> {
let mut manifest: Manifest<MetadataRoot> = Manifest::from_path_with_metadata(cargo_path)?;
let raw_manifest = std::fs::read_to_string(cargo_path)?;
let mut manifest: Manifest<MetadataRoot> =
Manifest::from_slice_with_metadata(raw_manifest.as_bytes())?;
if let Some(ref mut package) = manifest.package {
if let Some(ref mut metadata) = package.metadata {
if let Some(ref mut component) = metadata.component {
Expand Down

0 comments on commit 31cdcf1

Please sign in to comment.