mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Fix warnings in tests
Remove following warnings - unused import - unused Result Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
+4
-4
@@ -6,7 +6,7 @@
|
||||
|
||||
use cgroups::cpuset::CpuSetController;
|
||||
use cgroups::error::ErrorKind;
|
||||
use cgroups::{Cgroup, CgroupPid, CpuResources, Hierarchy, Resources};
|
||||
use cgroups::{Cgroup, CgroupPid};
|
||||
|
||||
use std::fs;
|
||||
|
||||
@@ -21,7 +21,7 @@ fn test_cpuset_memory_pressure_root_cg() {
|
||||
let res = cpuset.set_enable_memory_pressure(true);
|
||||
assert_eq!(res.unwrap_err().kind(), &ErrorKind::InvalidOperation);
|
||||
}
|
||||
cg.delete();
|
||||
cg.delete().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -59,7 +59,7 @@ fn test_cpuset_set_cpus() {
|
||||
assert_eq!(format!("{}-{}", set.cpus[0].0, set.cpus[0].1), cpus);
|
||||
}
|
||||
}
|
||||
cg.delete();
|
||||
cg.delete().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -89,5 +89,5 @@ fn test_cpuset_set_cpus_add_task() {
|
||||
println!("tasks after deleted: {:?}", tasks);
|
||||
assert_eq!(0, tasks.len());
|
||||
|
||||
cg.delete();
|
||||
cg.delete().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user