cgroups-rs icon indicating copy to clipboard operation
cgroups-rs copied to clipboard

Fix all warnings from the compiler

Open campbellC opened this issue 5 years ago • 0 comments

I wanted to get a feel for the repo so decided to fix the compile-time warnings.

  • Replace assert_eq!(1,0); std::mem::uninitialized with 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.

campbellC avatar Sep 06 '20 20:09 campbellC