Skip to content
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

ref: Update main to indicate it does not return #2192

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

szokeasaurusrex
Copy link
Member

Sentry CLI's main function calls commands::main, which does not return, since it calls std::process::exit. Update the function signature to reflect this.

Depends on #2191

Sentry CLI's `main` function calls `commands::main`, which does not return, since it calls `std::process::exit`. Update the function signature to reflect this.
@@ -4,6 +4,6 @@ mod config;
mod constants;
mod utils;

pub fn main() {
pub fn main() -> ! {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, is ! stable yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that it is not yet stable as a type, but it is stable when used to indicate that a function never returns, like how I am using it here

Base automatically changed from szokeasaurusrex/commands-main-no-return to master October 23, 2024 10:39
@szokeasaurusrex szokeasaurusrex merged commit 6d0729d into master Oct 23, 2024
11 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/main-no-return branch October 23, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants