cgroups-rs
cgroups-rs copied to clipboard
Fix all warnings from the compiler
I wanted to get a feel for the repo so decided to fix the compile-time warnings.
- Replace
assert_eq!(1,0); std::mem::uninitializedwith a panic!. I've also wrapped this in a macro to avoid the boilerplate. - Minor fix ups to
Result's not being used in tests - Ran
cargo fmt- hence the many whitespace changes, apologies if this is noisy I can resubmit as two separate commits if it will help readability. - One of the warnings I think was actually a bug - a cgroup builder could fail to apply resource constraints but still return a Cgroup silently. Now a builder will return an Error correctly in this case - this is an API change though so requires a mv bump.