Derive Default, Clone and Copy for VringConfigData

It is helpful for the consumer of this crate to be able clone and copy
the VringConfigData structure, as well as being able to initialize it
only partially thanks to the Default trait.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2021-08-04 00:01:10 +02:00 committed by Sergio Lopez
parent 9a1aa0b3c7
commit 868181c1fa
2 changed files with 2 additions and 1 deletions

View file

@ -1 +1 @@
{"coverage_score": 82.3, "exclude_path": "src/vhost_kern/", "crate_features": "vhost-user-master,vhost-user-slave"}
{"coverage_score": 81.9, "exclude_path": "src/vhost_kern/", "crate_features": "vhost-user-master,vhost-user-slave"}

View file

@ -21,6 +21,7 @@ use super::Result;
pub const VHOST_MAX_MEMORY_REGIONS: usize = 255;
/// Vring configuration data.
#[derive(Default, Clone, Copy)]
pub struct VringConfigData {
/// Maximum queue size supported by the driver.
pub queue_max_size: u16,