Open
Conversation
This change simply fixes all the warnings from the latest version of the compiler. It also removes the (non-test code) unsafe blocks. 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.
liubin
added a commit
to liubin/cgroups-rs
that referenced
this pull request
Sep 23, 2020
And in Travis CI, treat warnings as error to keep from merging codes with warning. Fixes: levex#13 Signed-off-by: bin liu <bin@hyper.sh>
liubin
added a commit
to liubin/cgroups-rs
that referenced
this pull request
Sep 23, 2020
And in Travis CI, treat warnings as error to keep from merging codes with warning. Fixes: levex#13 Signed-off-by: bin liu <bin@hyper.sh>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to get a feel for the repo so decided to fix the compile-time warnings.
assert_eq!(1,0); std::mem::uninitializedwith a panic!. I've also wrapped this in a macro to avoid the boilerplate.Result's not being used in testscargo fmt- hence the many whitespace changes, apologies if this is noisy I can resubmit as two separate commits if it will help readability.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.