Fix warnings in tests

Remove following warnings
- unused import
- unused Result

Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
Tim Zhang
2020-11-11 20:12:30 +08:00
parent f34225411e
commit fbd7164c29
10 changed files with 62 additions and 63 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
//! Integration test about setting resources using `apply()`
use cgroups::pid::PidController;
use cgroups::{Cgroup, Hierarchy, MaxValue, PidResources, Resources};
use cgroups::{Cgroup, MaxValue, PidResources, Resources};
#[test]
fn pid_resources() {
@@ -19,7 +19,7 @@ fn pid_resources() {
},
..Default::default()
};
cg.apply(&res);
cg.apply(&res).unwrap();
// verify
let pidcontroller: &PidController = cg.controller_of().unwrap();
@@ -27,5 +27,5 @@ fn pid_resources() {
assert_eq!(pid_max.is_ok(), true);
assert_eq!(pid_max.unwrap(), MaxValue::Value(512));
}
cg.delete();
cg.delete().unwrap();
}