mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 08:28:34 +00:00
protocols: Do cargo format to make codes clean
Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -115,7 +115,7 @@ impl From<oci::PosixRlimit> for grpc::POSIXRlimit {
|
||||
impl From<oci::Process> for grpc::Process {
|
||||
fn from(from: oci::Process) -> Self {
|
||||
grpc::Process {
|
||||
Terminal: from.terminal().map_or(false, |t| t),
|
||||
Terminal: from.terminal().is_some_and(|t| t),
|
||||
ConsoleSize: from_option(from.console_size()),
|
||||
User: from_option(Some(from.user().clone())),
|
||||
Args: option_vec_to_vec(from.args()),
|
||||
@@ -161,7 +161,7 @@ impl From<oci::LinuxMemory> for grpc::LinuxMemory {
|
||||
Kernel: from.kernel().map_or(0, |t| t),
|
||||
KernelTCP: from.kernel_tcp().map_or(0, |t| t),
|
||||
Swappiness: from.swappiness().map_or(0, |t| t),
|
||||
DisableOOMKiller: from.disable_oom_killer().map_or(false, |t| t),
|
||||
DisableOOMKiller: from.disable_oom_killer().is_some_and(|t| t),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user