]> git.bitcoin.ninja Git - rust-lightning/commit
Fix trailing semicolon warnings on latest rustc nightly 2021-08-nightly-warnings
authorMatt Corallo <git@bluematt.me>
Wed, 18 Aug 2021 00:33:56 +0000 (00:33 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 18 Aug 2021 00:34:13 +0000 (00:34 +0000)
commitcb7faf89511de2c989ff8667e5ea688030d10bce
tree352a2bca635717a34cad31fec74e2f2b0627d00b
parent803d8041f143469993620ed75e84cba226b860fa
Fix trailing semicolon warnings on latest rustc nightly

Latest rustc nightly compiles are filled with warnings like the
following, which we fix here:

```
warning: trailing semicolon in macro used in expression position
   --> lightning/src/util/macro_logger.rs:163:114
    |
163 |         $logger.log(&$crate::util::logger::Record::new($lvl, format_args!($($arg)+), module_path!(), file!(), line!()));
    |                                                                                                                        ^
    |
   ::: lightning/src/chain/chainmonitor.rs:165:9
    |
165 |         log_debug!(self.logger, "New best block {} at height {} provided via block_connected", header.block_hash(), height);
    |         -------------------------------------------------------------------------------------------------------------------- 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 <https://github.com/rust-lang/rust/issues/79813>
    = note: this warning originates in the macro `log_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
```
lightning/src/ln/functional_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/util/macro_logger.rs