agent: fix clippy warnings caused by protobuf3

Fix warnings introduced by protobuf upgrade.

Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
Tim Zhang 2023-04-17 20:15:49 +08:00
parent 4849c56faa
commit 2e3f19af92
2 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ async fn ephemeral_storage_handler(
// By now we only support one option field: "fsGroup" which
// isn't an valid mount option, thus we should remove it when
// do mount.
if storage.options.len() > 0 {
if !storage.options.is_empty() {
// ephemeral_storage didn't support mount options except fsGroup.
let mut new_storage = storage.clone();
new_storage.options = Default::default();

View File

@ -2034,7 +2034,7 @@ fn load_kernel_module(module: &protocols::agent::KernelModule) -> Result<()> {
let mut args = vec!["-v".to_string(), module.name.clone()];
if module.parameters.len() > 0 {
if !module.parameters.is_empty() {
args.extend(module.parameters.to_vec())
}