MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / drop

Method drop

tests/all/cli_tests.rs:1696–1718  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1694 // if our server goes away.
1695 impl Drop for WasmtimeServe {
1696 fn drop(&mut self) {
1697 match &mut self.child {
1698 Some(child) => match child.kill() {
1699 Ok(()) => {}
1700 Err(e) => {
1701 eprintln!("failed to kill child process {e}");
1702 return;
1703 }
1704 },
1705 None => return,
1706 }
1707 match self._finish() {
1708 Ok((stdout, stderr)) => {
1709 if !stdout.is_empty() {
1710 println!("server stdout:\n{stdout}");
1711 }
1712 if !stderr.is_empty() {
1713 println!("server stderr:\n{stderr}");
1714 }
1715 }
1716 Err(e) => println!("failed to wait for child or read stdio: {e}"),
1717 }
1718 }
1719 }
1720
1721 #[tokio::test]

Callers

nothing calls this directly

Calls 2

_finishMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected