Skip to content

Commit

Permalink
Merge #2978
Browse files Browse the repository at this point in the history
2978: chore: remove trailing semicolons in macro r=driftluo,yangby-cryptape a=keroro520

<!--
Thank you for contributing to nervosnetwork/ckb!

If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetwork/ckb/blob/develop/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed
-->

### What problem does this PR solve?

According to rust-lang/rust#79813 says, a trailing semicolon in macros is useless.

When compiling CKB on 1.56.0-nightly, the compiler report the below warning:

```
warning: trailing semicolon in macro used in expression position
   --> util/types/src/core/hardfork.rs:260:20
    |
260 |                 })?;
    |                    ^
...
263 |         let rfc_0028 = try_find!(rfc_0028);
    |                        ------------------- in this macro invocation
    |
    = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <rust-lang/rust#79813>
    = note: this warning originates in the macro `try_find` (in Nightly builds, run with -Z macro-backtrace for more info)
```

### What is changed and how it works?

Just remove trailing semicolons in macro. This PR will not introduce any new behavior.

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- No code (skip ci)

### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->

```release-note
None: Exclude this PR from the release note.
```

Co-authored-by: keroro <[email protected]>
  • Loading branch information
bors[bot] and keroro520 authored Aug 26, 2021
2 parents 35aa766 + d26da05 commit 4fd2825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/types/src/core/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl HardForkSwitchBuilder {
($feature:ident) => {
self.$feature.ok_or_else(|| {
concat!("The feature ", stringify!($feature), " isn't configured.").to_owned()
})?;
})?
};
}
let rfc_0028 = try_find!(rfc_0028);
Expand Down

0 comments on commit 4fd2825

Please sign in to comment.