diff --git a/src/tools/genpolicy/src/list.rs b/src/tools/genpolicy/src/list.rs index 3b6667261b..9e4a48836e 100644 --- a/src/tools/genpolicy/src/list.rs +++ b/src/tools/genpolicy/src/list.rs @@ -18,7 +18,6 @@ use protocols::agent; use serde::{Deserialize, Serialize}; use serde_yaml::Value; use std::boxed; -use std::collections::BTreeMap; use std::marker::{Send, Sync}; #[derive(Debug, Serialize, Deserialize)] @@ -90,10 +89,6 @@ impl yaml::K8sResource for List { panic!("Unsupported"); } - fn get_annotations(&self) -> &Option> { - panic!("Unsupported"); - } - fn use_host_network(&self) -> bool { panic!("Unsupported"); } diff --git a/src/tools/genpolicy/src/no_policy.rs b/src/tools/genpolicy/src/no_policy.rs index e5af283319..b920550999 100644 --- a/src/tools/genpolicy/src/no_policy.rs +++ b/src/tools/genpolicy/src/no_policy.rs @@ -14,7 +14,6 @@ use crate::yaml; use async_trait::async_trait; use protocols::agent; -use std::collections::BTreeMap; #[derive(Clone, Debug)] pub struct NoPolicyResource { @@ -57,10 +56,6 @@ impl yaml::K8sResource for NoPolicyResource { panic!("Unsupported"); } - fn get_annotations(&self) -> &Option> { - panic!("Unsupported"); - } - fn use_host_network(&self) -> bool { panic!("Unsupported"); } diff --git a/src/tools/genpolicy/src/secret.rs b/src/tools/genpolicy/src/secret.rs index 62f8fe9ca0..6def0cf49c 100644 --- a/src/tools/genpolicy/src/secret.rs +++ b/src/tools/genpolicy/src/secret.rs @@ -104,10 +104,6 @@ impl yaml::K8sResource for Secret { panic!("Unsupported"); } - fn get_annotations(&self) -> &Option> { - panic!("Unsupported"); - } - fn use_host_network(&self) -> bool { panic!("Unsupported"); } diff --git a/src/tools/genpolicy/src/yaml.rs b/src/tools/genpolicy/src/yaml.rs index 9ac1302f33..71f4f93195 100644 --- a/src/tools/genpolicy/src/yaml.rs +++ b/src/tools/genpolicy/src/yaml.rs @@ -66,7 +66,10 @@ pub trait K8sResource { ); fn get_containers(&self) -> &Vec; - fn get_annotations(&self) -> &Option>; + fn get_annotations(&self) -> &Option> { + panic!("Unsupported"); + } + fn use_host_network(&self) -> bool; fn use_sandbox_pidns(&self) -> bool; }