mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Lint: Fix clippy errors
Fixes: #99 Signed-off-by: Danny Canter <danny@dcantah.dev>
This commit is contained in:
@@ -176,7 +176,7 @@ impl Hierarchy for V1 {
|
|||||||
fn parent_control_group(&self, path: &str) -> Cgroup {
|
fn parent_control_group(&self, path: &str) -> Cgroup {
|
||||||
let path = Path::new(path);
|
let path = Path::new(path);
|
||||||
let parent_path = path.parent().unwrap().to_string_lossy().to_string();
|
let parent_path = path.parent().unwrap().to_string_lossy().to_string();
|
||||||
Cgroup::load(auto(), &parent_path)
|
Cgroup::load(auto(), parent_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn root(&self) -> PathBuf {
|
fn root(&self) -> PathBuf {
|
||||||
@@ -258,7 +258,7 @@ impl Hierarchy for V2 {
|
|||||||
fn parent_control_group(&self, path: &str) -> Cgroup {
|
fn parent_control_group(&self, path: &str) -> Cgroup {
|
||||||
let path = Path::new(path);
|
let path = Path::new(path);
|
||||||
let parent_path = path.parent().unwrap().to_string_lossy().to_string();
|
let parent_path = path.parent().unwrap().to_string_lossy().to_string();
|
||||||
Cgroup::load(auto(), &parent_path)
|
Cgroup::load(auto(), parent_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn root(&self) -> PathBuf {
|
fn root(&self) -> PathBuf {
|
||||||
|
|||||||
Reference in New Issue
Block a user