runtime-rs: CreateContainerRequest has Default

We can just use it to initialize the default fields.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2022-12-12 09:49:04 +00:00
parent e9e82ce28b
commit 5b6596f54e

View File

@ -143,13 +143,10 @@ impl Container {
// create container
let r = agent::CreateContainerRequest {
process_id: agent::ContainerProcessID::new(&config.container_id, ""),
string_user: None,
devices: vec![],
storages,
oci: Some(spec),
guest_hooks: None,
sandbox_pidns,
rootfs_mounts: vec![],
..Default::default()
};
self.agent