mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-29 00:41:19 +00:00
Preparation for upgrade to Rust version to 1.63.0
In preparation to upgrade to Rust version 1.63.0, address clippy warning demanding that 'Eq' be derived when 'PartialEq' is. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
160041faa4
commit
843a03590b
@ -22,7 +22,7 @@ use crate::vhu_gpio::VhostUserGpioBackend;
|
||||
|
||||
pub(crate) type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
#[derive(Debug, PartialEq, ThisError)]
|
||||
#[derive(Debug, Eq, PartialEq, ThisError)]
|
||||
/// Errors related to low level GPIO helpers
|
||||
pub enum Error {
|
||||
#[error("Invalid socket count: {0}")]
|
||||
|
||||
@ -36,7 +36,7 @@ const NUM_QUEUES: usize = 1;
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
type VhostUserBackendResult<T> = std::result::Result<T, std::io::Error>;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, ThisError)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, ThisError)]
|
||||
/// Errors related to vhost-device-i2c daemon.
|
||||
pub enum Error {
|
||||
#[error("Failed to handle event, didn't match EPOLLIN")]
|
||||
|
||||
@ -25,7 +25,7 @@ const VHU_RNG_MAX_PERIOD_MS: u128 = 65536;
|
||||
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
#[derive(Debug, PartialEq, ThisError)]
|
||||
#[derive(Debug, Eq, PartialEq, ThisError)]
|
||||
/// Errors related to vhost-device-rng daemon.
|
||||
pub enum Error {
|
||||
#[error("RNG source file doesn't exists or can't be accessed")]
|
||||
@ -62,7 +62,7 @@ struct RngArgs {
|
||||
rng_source: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct VuRngConfig {
|
||||
pub period_ms: u128,
|
||||
pub max_bytes: usize,
|
||||
|
||||
@ -32,7 +32,7 @@ const NUM_QUEUES: usize = 1;
|
||||
type Result<T> = std::result::Result<T, VuRngError>;
|
||||
type RngDescriptorChain = DescriptorChain<GuestMemoryLoadGuard<GuestMemoryMmap<()>>>;
|
||||
|
||||
#[derive(Debug, PartialEq, ThisError)]
|
||||
#[derive(Debug, Eq, PartialEq, ThisError)]
|
||||
/// Errors related to vhost-device-rng daemon.
|
||||
pub enum VuRngError {
|
||||
#[error("Descriptor not found")]
|
||||
@ -65,7 +65,7 @@ impl convert::From<VuRngError> for io::Error {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct VuRngTimerConfig {
|
||||
period_ms: u128,
|
||||
period_start: Instant,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user