-
Notifications
You must be signed in to change notification settings - Fork 2k
Adding clippy::exit
lint
#3994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Adding clippy::exit
lint
#3994
Conversation
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
25f11e5
to
932421c
Compare
21ae4d5
to
2dcffb1
Compare
34c1ad5
to
4779b99
Compare
JonathanWoollett-Light
previously approved these changes
Aug 1, 2023
17aab38
to
92dc405
Compare
roypat
previously requested changes
Aug 4, 2023
697319c
to
3de4ff8
Compare
18d8bde
to
9e27f04
Compare
Waiting for Sudan to look into this too, but generally looks good to me!
JonathanWoollett-Light
approved these changes
Aug 8, 2023
roypat
approved these changes
Aug 9, 2023
Removed `std::process::exit` call. Updated `main` to return `Result`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
Renamed `Error` enums with more descriptive names. Removed redefinition of `Result` type. Signed-off-by: Egor Lazarchuk <[email protected]>
Replaced `std::process::exit` calls with error enums. Errors are now returned from `main`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
-Moved creation of HttpServer out of `bind_and_run`. -Renamed `bind_and_run` into `run`, changed return type to void and updated doc description. -Removed `Error` enum and `Result` redefinition as they are not used anymore. -Added `getrandom` syscall to api thread allow list. It is needed for `HashMap` inside `HttpServer` to reinitialize it's thread local vars. Signed-off-by: Egor Lazarchuk <[email protected]>
Replaced `std::process::exit` calls with error enums. Errors are now returned from `main`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
Renamed `Error` enums with more descriptive names. Removed redefinition of `Result` type. Signed-off-by: Egor Lazarchuk <[email protected]>
Replaced `std::process::exit` calls with error enums. Errors are now returned from `main`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
Replaced `std::process::exit` calls with error enums. Errors are now returned from `main`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
Renamed `Error` enums with more descriptive names. Removed redefinition of `Result` type. Signed-off-by: Egor Lazarchuk <[email protected]>
Sets clippy to warn on the lint `clippy::exit`. Signed-off-by: Egor Lazarchuk <[email protected]> Co-authored-by: Lukas Schwerdtfeger <[email protected]>
Updated code coverage Signed-off-by: Egor Lazarchuk <[email protected]>
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Awaiting review
Indicates that a pull request is ready to be reviewed
Type: Enhancement
Indicates new feature requests
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.
Changes
This PR is build on top of another PR: #3575
Adds new lint:
clippy::exit
and makes necessary changes for it.Updates
Error
andResult
types for several crates.Reason
Enables the use of
clippy::exit
. Fixes #3233License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
CHANGELOG.md
.TODO
s link to an issue.rust-vmm
.