]> git.bitcoin.ninja Git - rust-lightning/commit
Make BackgroundProcessor `#[must_use]` to avoid dropping immediately 2021-07-log-channel-close
authorMatt Corallo <git@bluematt.me>
Sun, 1 Aug 2021 02:42:42 +0000 (02:42 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 5 Aug 2021 20:24:21 +0000 (20:24 +0000)
commit5307b5e8ceb2bb2ac9634eafd3c8b123d25da34f
tree994ccb1cf36c8a099dd4b0cb7675df7831474dcb
parentcab2ca8eeb6e8e4e75ad9227f440900ba9a787cb
Make BackgroundProcessor `#[must_use]` to avoid dropping immediately

It is easy for users to have a bug where they drop a
`BackgroundProcessor` immediately, causing it to start and then
immediately stop. Instead, add a `#[must_use]` tag to provide a
compiler warning for such instances.
lightning-background-processor/src/lib.rs