From fc12184c0d937820e7fa18fc40edc5702a3751d7 Mon Sep 17 00:00:00 2001 From: Darrell Tang Date: Sun, 14 Jan 2024 11:00:11 -0800 Subject: [PATCH] fix linting issues Signed-off-by: Darrell Tang --- crates/youki/src/commands/features.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/youki/src/commands/features.rs b/crates/youki/src/commands/features.rs index ce10fd690..788f0f728 100644 --- a/crates/youki/src/commands/features.rs +++ b/crates/youki/src/commands/features.rs @@ -1,6 +1,6 @@ //! Contains Functionality of `features` container command -use anyhow::{Context, Result}; -use caps::{all, CapSet, Capability}; +use anyhow::Result; +use caps::{all, CapSet}; use liboci_cli::Features; use serde::{Deserialize, Serialize}; use std::collections::HashMap; @@ -14,13 +14,13 @@ pub const ANNOTATION_LIBSECCOMP_VERSION: &str = "io.github.seccomp.libseccomp.ve #[derive(Debug, Serialize, Deserialize)] pub struct HardFeatures { // Minimum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.0". - ociVersionMin: Option, + oci_version_min: Option, // Maximum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.2-dev". - ociVersionMax: Option, + oci_version_max: Option, // List of the recognized hook names, e.g., "createRuntime". hooks: Option>, // List of the recognized mount options, e.g., "ro". - mountOptions: Option>, + mount_options: Option>, // Specific to Linux. linux: Option, // Contains implementation-specific annotation strings. @@ -63,7 +63,7 @@ struct Cgroup { v1: Option, v2: Option, systemd: Option, - systemdUser: Option, + systemd_user: Option, } // Function to query and return capabilities @@ -118,8 +118,8 @@ pub fn features(_: Features) -> Result<()> { let features = HardFeatures { - ociVersionMin: Some(String::from("1.0.0")), - ociVersionMax: Some(String::from("1.0.2-dev")), + oci_version_min: Some(String::from("1.0.0")), + oci_version_max: Some(String::from("1.0.2-dev")), hooks: Some(vec![ String::from("prestart"), String::from("createRuntime"), @@ -128,7 +128,7 @@ pub fn features(_: Features) -> Result<()> { String::from("poststart"), String::from("poststop"), ]), - mountOptions: Some(vec![ + mount_options: Some(vec![ String::from("acl"), String::from("async"), String::from("atime"), @@ -199,7 +199,7 @@ pub fn features(_: Features) -> Result<()> { v1: Some(true), v2: Some(true), systemd: Some(true), - systemdUser: Some(true), + systemd_user: Some(true), }), seccomp: Some(Seccomp { enabled: Some(true),