mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Remove Box wrap of Cgroup.hire
It's unnecessary. Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
+2
-4
@@ -11,8 +11,7 @@ use cgroups::{Cgroup, MaxValue};
|
||||
#[test]
|
||||
fn test_disable_oom_killer() {
|
||||
let h = cgroups::hierarchies::auto();
|
||||
let h = Box::new(&*h);
|
||||
let cg = Cgroup::new(h, String::from("test_disable_oom_killer"));
|
||||
let cg = Cgroup::new(&*h, String::from("test_disable_oom_killer"));
|
||||
{
|
||||
let mem_controller: &MemController = cg.controller_of().unwrap();
|
||||
|
||||
@@ -41,8 +40,7 @@ fn set_mem_v2() {
|
||||
return;
|
||||
}
|
||||
|
||||
let h = Box::new(&*h);
|
||||
let cg = Cgroup::new(h, String::from("set_mem_v2"));
|
||||
let cg = Cgroup::new(&*h, String::from("set_mem_v2"));
|
||||
{
|
||||
let mem_controller: &MemController = cg.controller_of().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user