@@ -91,31 +91,21 @@ impl SystemdManager<'_> {
9191 & self . unit
9292 }
9393
94- fn set_cpuset (
95- & self ,
96- props : & mut Vec < Property > ,
97- linux_cpu : & LinuxCpu ,
98- systemd_version : usize ,
99- ) -> Result < ( ) > {
94+ fn set_cpuset ( & self , props : & mut Vec < Property > , linux_cpu : & LinuxCpu ) -> Result < ( ) > {
10095 if let Some ( cpus) = linux_cpu. cpus ( ) . as_ref ( ) {
101- let ( id, value) = cpuset:: cpus ( cpus, systemd_version ) ?;
96+ let ( id, value) = cpuset:: cpus ( cpus) ?;
10297 props. push ( ( id, value. into ( ) ) ) ;
10398 }
10499
105100 if let Some ( mems) = linux_cpu. mems ( ) . as_ref ( ) {
106- let ( id, value) = cpuset:: mems ( mems, systemd_version ) ?;
101+ let ( id, value) = cpuset:: mems ( mems) ?;
107102 props. push ( ( id, value. into ( ) ) ) ;
108103 }
109104
110105 Ok ( ( ) )
111106 }
112107
113- fn set_cpu (
114- & self ,
115- props : & mut Vec < Property > ,
116- linux_cpu : & LinuxCpu ,
117- systemd_version : usize ,
118- ) -> Result < ( ) > {
108+ fn set_cpu ( & self , props : & mut Vec < Property > , linux_cpu : & LinuxCpu ) -> Result < ( ) > {
119109 if let Some ( shares) = linux_cpu. shares ( ) {
120110 let shares = if self . v2 ( ) {
121111 conv:: cpu_shares_to_cgroup_v2 ( shares)
@@ -130,7 +120,7 @@ impl SystemdManager<'_> {
130120 let quota = linux_cpu. quota ( ) . unwrap_or ( 0 ) ;
131121
132122 if period != 0 {
133- let ( id, value) = cpu:: period ( period, systemd_version ) ?;
123+ let ( id, value) = cpu:: period ( period) ?;
134124 props. push ( ( id, value. into ( ) ) ) ;
135125 }
136126
@@ -272,11 +262,9 @@ impl Manager for SystemdManager<'_> {
272262 fn set ( & mut self , resources : & LinuxResources ) -> Result < ( ) > {
273263 let mut props = vec ! [ ] ;
274264
275- let systemd_version = self . systemd_client . systemd_version ( ) ?;
276-
277265 if let Some ( linux_cpu) = resources. cpu ( ) {
278- self . set_cpuset ( & mut props, linux_cpu, systemd_version ) ?;
279- self . set_cpu ( & mut props, linux_cpu, systemd_version ) ?;
266+ self . set_cpuset ( & mut props, linux_cpu) ?;
267+ self . set_cpu ( & mut props, linux_cpu) ?;
280268 }
281269
282270 if let Some ( linux_memory) = resources. memory ( ) {
0 commit comments