Replace some &String with &Path

This commit is contained in:
Sam Wilson
2018-10-12 11:05:56 -04:00
committed by Levente Kurusa
parent 3413b7d847
commit 751dbc7244
2 changed files with 8 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ extern crate log;
use std::fs::File;
use std::io::{BufRead, BufReader, Write};
use std::path::PathBuf;
use std::path::{Path, PathBuf};
pub mod blkio;
pub mod cgroup;
@@ -492,7 +492,7 @@ impl<'a> From<&'a std::process::Child> for CgroupPid {
}
impl Subsystem {
fn enter(self, path: &String) -> Self {
fn enter(self, path: &Path) -> Self {
match self {
Subsystem::Pid(cont) => Subsystem::Pid({
let mut c = cont.clone();