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

Ignore non_fmt_panic warning #80

Merged
merged 1 commit into from
Feb 6, 2021
Merged

Ignore non_fmt_panic warning #80

merged 1 commit into from
Feb 6, 2021

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Feb 6, 2021

No description provided.

@taiki-e
Copy link
Member Author

taiki-e commented Feb 6, 2021

Hmm, std::panic::panic_any requires Rust 1.51+. I'll ignore this warning for now.

@taiki-e taiki-e changed the title Fix non_fmt_panic warning Ignore non_fmt_panic warning Feb 6, 2021
@taiki-e taiki-e merged commit 0056827 into tokio-rs:master Feb 6, 2021
@taiki-e taiki-e deleted the non_fmt_panic branch February 6, 2021 16:37
@m-ou-se
Copy link

m-ou-se commented Feb 6, 2021

Is there any reason for not just using a panic!("test") instead of panic!(())? Part of the reason for moving this functionality to a separate function is to discourage use of non-string panics.

(Then instead of payload.is::<()>(), payload.downcast_ref() == Some(&"test") should work.)

@taiki-e
Copy link
Member Author

taiki-e commented Feb 7, 2021

using a panic!("test") instead of panic!(())

Sorry. I missed that this works.

@taiki-e taiki-e mentioned this pull request Feb 7, 2021
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