pub fn writeln_special<T, V>(file_path: &T, value: V) -> Result<()>
where
    T: AsRef<Path>,
    V: ::std::fmt::Display,
{
    fs::write(file_path, format!("{}\n", value))
        .map_err(|e| Error::Write(PathBuf::from(file_path.as_ref()), e))
}
// It's called writeln_special because we have to use this rather convoluted way of writing
// to special cgroup files, to avoid getting errors. It would be nice to know why that happens :-s
It's called writeln_special because we have to use this rather convoluted way of writing
to special cgroup files, to avoid getting errors. It would be nice to know why that happens :-s
It ' s called writeln_special because we have to use this rather convoluted way of writing to special cgroup files to avoid getting errors . It would be nice to know why that happens : - s
pub fn writeln_special<T, V>(file_path: &T, value: V) -> Result<()>
where
    T: AsRef<Path>,
    V: ::std::fmt::Display,
{
    fs::write(file_path, format!("{}\n", value))
        .map_err(|e| Error::Write(PathBuf::from(file_path.as_ref()), e))
}
pub fn writeln_special < T , V > ( file_path : & T , value : V ) -> Result < ( ) > where T : AsRef < Path > , V : :: std :: fmt :: Display , { fs :: write ( file_path , format ! ( " \n " value ) ) . map_err ( | e | Error :: Write ( PathBuf :: from ( file_path . as_ref ( ) ) , e ) ) }
It's called writeln_special because we have to use this rather convoluted way of writing
to special cgroup files, to avoid getting errors.
It ' s called writeln_special because we have to use this rather convoluted way of writing to special cgroup files to avoid getting errors .
file_path
&T
value
V
file_path
&T
value
V