mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: Make RngConfig owned
Convert Path to PathBuf and remove the associated lifetime. Fixes #298 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
0688bec298
commit
5323da031c
@ -268,14 +268,14 @@ impl NetConfig {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RngConfig<'a> {
|
||||
pub src: &'a Path,
|
||||
pub struct RngConfig {
|
||||
pub src: PathBuf,
|
||||
}
|
||||
|
||||
impl<'a> RngConfig<'a> {
|
||||
pub fn parse(rng: &'a str) -> Result<Self> {
|
||||
impl RngConfig {
|
||||
pub fn parse(rng: &str) -> Result<Self> {
|
||||
Ok(RngConfig {
|
||||
src: Path::new(rng),
|
||||
src: PathBuf::from(rng),
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -615,7 +615,7 @@ pub struct VmConfig<'a> {
|
||||
pub cmdline: CmdlineConfig,
|
||||
pub disks: Option<Vec<DiskConfig>>,
|
||||
pub net: Option<Vec<NetConfig>>,
|
||||
pub rng: RngConfig<'a>,
|
||||
pub rng: RngConfig,
|
||||
pub fs: Option<Vec<FsConfig<'a>>>,
|
||||
pub pmem: Option<Vec<PmemConfig<'a>>>,
|
||||
pub serial: ConsoleConfig<'a>,
|
||||
|
Loading…
Reference in New Issue
Block a user