Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

fix deprecated usage of panic #8134

Merged
merged 2 commits into from
Feb 16, 2021
Merged

fix deprecated usage of panic #8134

merged 2 commits into from
Feb 16, 2021

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Feb 16, 2021

due to rust-lang/rust#81645 panic now seems to requrie a string literal as first argument, thus the fix.

@gui1117 gui1117 added A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Feb 16, 2021
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Feb 16, 2021
@@ -320,7 +320,7 @@ where
) {
extrinsics.into_iter().for_each(|e| if let Err(e) = Self::apply_extrinsic(e) {
let err: &'static str = e.into();
panic!(err)
panic!("{}", err)
Copy link
Contributor

@ascjones ascjones Feb 16, 2021

Choose a reason for hiding this comment

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

Doesn't the error implement Display itself?

Edit: It does but only in std

#[cfg(feature = "std")]
impl std::fmt::Display for TransactionValidityError {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah only on "std", I guess we can implement display on on not(std) as well

@gui1117 gui1117 merged commit fb1b15c into master Feb 16, 2021
@gui1117 gui1117 deleted the gui-fix-panic branch February 16, 2021 18:02
KalitaAlexey pushed a commit to KalitaAlexey/substrate that referenced this pull request Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants