diff --git a/src/agent/rustjail/src/cgroups/notifier.rs b/src/agent/rustjail/src/cgroups/notifier.rs index 91c88be1f9..a3a7f4e855 100644 --- a/src/agent/rustjail/src/cgroups/notifier.rs +++ b/src/agent/rustjail/src/cgroups/notifier.rs @@ -8,7 +8,7 @@ use eventfd::{eventfd, EfdFlags}; use nix::sys::eventfd; use std::fs::{self, File}; use std::os::unix::io::{AsRawFd, FromRawFd}; -use std::path::{Path, PathBuf}; +use std::path::Path; use crate::pipestream::PipeStream; use futures::StreamExt as _; @@ -35,7 +35,7 @@ pub async fn notify_oom(cid: &str, cg_dir: String) -> Result> { // Flat keyed file format: // KEY0 VAL0\n // KEY1 VAL1\n -fn get_value_from_cgroup(path: &PathBuf, key: &str) -> Result { +fn get_value_from_cgroup(path: &Path, key: &str) -> Result { let content = fs::read_to_string(path)?; info!( sl!(),