MCPcopy Create free account
hub / github.com/bytecodealliance/cargo-component / update_manifest

Method update_manifest

tests/support/mod.rs:338–346  ·  view source on GitHub ↗
(
        &self,
        f: impl FnOnce(DocumentMut) -> Result<DocumentMut>,
    )

Source from the content-addressed store, hash-verified

336 }
337
338 pub fn update_manifest(
339 &self,
340 f: impl FnOnce(DocumentMut) -> Result<DocumentMut>,
341 ) -> Result<()> {
342 let manifest = self.read_manifest()?;
343 let manifest_path = self.root.join("Cargo.toml");
344 fs::write(manifest_path, f(manifest)?.to_string())?;
345 Ok(())
346 }
347
348 pub fn build_dir(&self) -> PathBuf {
349 self.root().join("target")

Calls 1

read_manifestMethod · 0.80