mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-04 16:38:03 +00:00
I plan to add some wrapper errors around vhost errors. These end up nesting other errors all the way to std::error::Error, which has no Eq trait. The implementations were only used for comparisions in tests. While there is a assert_matches!() in nightly [1] it seems unlikely that further testing lib additions are getting standarized soon (or ever). One could use assert!(matches!()), but that would worsen the error messages for test failures. Hence, during review [2] we agreed on introducing the assert_matches crate. It got no dependencies and allows us to keep the good error messages while not needing to depend on nightly. Signed-off-by: Erik Schilling <erik.schilling@linaro.org> [1] https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html [2] https://github.com/rust-vmm/vhost-device/pull/388#discussion_r1257831748 |
||
|---|---|---|
| .. | ||
| gpio | ||
| i2c | ||
| rng | ||
| scsi | ||
| vsock | ||