diff --git a/ci/check-lint.sh b/ci/check-lint.sh index b20690707..b7f1bb909 100755 --- a/ci/check-lint.sh +++ b/ci/check-lint.sh @@ -35,6 +35,7 @@ RUSTFLAGS='-D warnings' cargo clippy -- \ -A clippy::len_without_is_empty \ -A clippy::len_zero \ -A clippy::let_and_return \ + -A clippy::manual_div_ceil `# to be removed once we hit MSRV 1.73.0` \ -A clippy::manual_filter \ -A clippy::manual_map \ -A clippy::manual_memcpy \ diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 40cfdcc46..495e9e730 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -711,7 +711,6 @@ impl Into for FailureCode { /// immediately (ie with no further calls on it made). Thus, this step happens inside a /// peer_state lock. We then return the set of things that need to be done outside the lock in /// this struct and call handle_error!() on it. - struct MsgHandleErrInternal { err: msgs::LightningError, closes_channel: bool, diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index acac9dc00..5dbca4514 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -210,7 +210,7 @@ for OnionMessenger where /// &offers_message_handler, &async_payments_message_handler, &dns_resolution_message_handler, /// &custom_message_handler, /// ); - +/// /// # #[derive(Debug)] /// # struct YourCustomMessage {} /// impl Writeable for YourCustomMessage { diff --git a/lightning/src/sync/mod.rs b/lightning/src/sync/mod.rs index 0d0a76e3f..3ed076b7d 100644 --- a/lightning/src/sync/mod.rs +++ b/lightning/src/sync/mod.rs @@ -46,7 +46,7 @@ mod ext_impl { } type ExclLock = MutexGuard<'a, T>; #[inline] - fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard { + fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard<'a, T> { self.lock().unwrap() } } @@ -57,7 +57,7 @@ mod ext_impl { } type ExclLock = RwLockWriteGuard<'a, T>; #[inline] - fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard { + fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard<'a, T> { self.write().unwrap() } }