vhost-device/crates
Erik Schilling 2b1b3644da tree-wide: drop the Eq trait from Error
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
2023-07-11 13:30:01 +05:30
..
gpio tree-wide: drop the Eq trait from Error 2023-07-11 13:30:01 +05:30
i2c tree-wide: drop the Eq trait from Error 2023-07-11 13:30:01 +05:30
rng tree-wide: drop the Eq trait from Error 2023-07-11 13:30:01 +05:30
scsi tree-wide: drop the Eq trait from Error 2023-07-11 13:30:01 +05:30
vsock vsock: use tempfile in tests 2023-07-11 13:01:41 +05:30