You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will fix or disable these Clippy warnings tomorrow. (It is already midnight in my timezone)
$ cargo +stable clippy --lib --tests --all-features --all-targetswarning: very complex type used. Consider factoring parts into `type` definitions --> src/sync/base_cache.rs:565:10 |565 | ) -> Option<(Arc<K>, TrioArc<ValueEntry<K, V>>)> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexitynote: the lint level is defined here --> src/lib.rs:1:9 |1 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::type_complexity)]` implied by `#[warn(clippy::all)]`warning: very complex type used. Consider factoring parts into `type` definitions --> src/sync/base_cache.rs:578:10 |578 | ) -> Option<(Arc<K>, TrioArc<ValueEntry<K, V>>)> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexitywarning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/sync/base_cache.rs:894:17 |894 | // self.remove(&Arc::clone(&kh.key), RemovalCause::Size)895 | || .map(|(k, v)| (self.eviction_handler)(k, &v.value, RemovalCause::Size)); | ||___________________________________________________________________________________________^- help: try this: `if let Some((k, v)) = self.remove(&Arc::clone(&kh.key), RemovalCause::Size) { (self.eviction_handler)(k, &v.value, RemovalCause::Size) }` | |___________________________________________________________________________________________| | | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `#[warn(clippy::option_map_unit_fn)]` implied by `#[warn(clippy::all)]`
The current beta Clippy emits the following clippy::arc_with_non_send_sync warning. For our case, Clippy is wrong. I will disable it only when the beta Clippy is used (otherwise stable Clippy will fail as it does not have clippy::arc_with_non_send_sync). I will do the same to moka-rs/moka#291.
$ cargo +beta clippy --lib --tests --all-features --all-targetswarning: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> src/sync/base_cache.rs:117:20 |117 | inner: Arc::new(inner), | ^^^^^^^^^^^^^^^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync... (snip. same as the stable) ...
The text was updated successfully, but these errors were encountered:
I will fix or disable these Clippy warnings tomorrow. (It is already midnight in my timezone)
The current beta Clippy emits the following
clippy::arc_with_non_send_sync
warning. For our case, Clippy is wrong. I will disable it only when the beta Clippy is used (otherwise stable Clippy will fail as it does not haveclippy::arc_with_non_send_sync
). I will do the same to moka-rs/moka#291.The text was updated successfully, but these errors were encountered: