mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vmm: config: Derive thiserror::Error
No further changes are necessary that adding a #[derive(Error)] as there is a manual implementation of Display. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
0270d697ab
commit
cb03540ffd
@ -15,7 +15,7 @@ use std::net::Ipv4Addr;
|
||||
use std::path::PathBuf;
|
||||
use std::result;
|
||||
use std::str::FromStr;
|
||||
|
||||
use thiserror::Error;
|
||||
use virtio_devices::{RateLimiterConfig, TokenBucketConfig};
|
||||
|
||||
pub const DEFAULT_VCPUS: u8 = 1;
|
||||
@ -36,7 +36,7 @@ pub const DEFAULT_NUM_PCI_SEGMENTS: u16 = 1;
|
||||
const MAX_NUM_PCI_SEGMENTS: u16 = 16;
|
||||
|
||||
/// Errors associated with VM configuration parameters.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
/// Filesystem tag is missing
|
||||
ParseFsTagMissing,
|
||||
@ -114,7 +114,7 @@ pub enum Error {
|
||||
ParseVdpaPathMissing,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Error)]
|
||||
pub enum ValidationError {
|
||||
/// Both console and serial are tty.
|
||||
DoubleTtyMode,
|
||||
|
Loading…
x
Reference in New Issue
Block a user