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

Function from_error

crates/core/tests/tests.rs:147–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145
146#[test]
147fn from_error() {
148 let error = Error::from(TestError(42));
149 assert!(error.is::<TestError>());
150 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42);
151}
152
153#[test]
154fn into_boxed_dyn_error() {

Callers

nothing calls this directly

Calls 2

fromFunction · 0.85
TestErrorClass · 0.70

Tested by

no test coverage detected