Remove Box wrap of Cgroup.hire

It's unnecessary.

Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
Tim Zhang
2020-11-11 20:02:21 +08:00
parent cd998f3f9b
commit f34225411e
11 changed files with 27 additions and 51 deletions
+1 -2
View File
@@ -11,8 +11,7 @@ use cgroups::{Cgroup, Hierarchy, MaxValue, PidResources, Resources};
#[test]
fn pid_resources() {
let h = cgroups::hierarchies::auto();
let h = Box::new(&*h);
let cg = Cgroup::new(h, String::from("pid_resources"));
let cg = Cgroup::new(&*h, String::from("pid_resources"));
{
let res = Resources {
pid: PidResources {