Skip to content

Commit

Permalink
[Clippy] Swap filter_map_bool_then to use diagnostic item instead o…
Browse files Browse the repository at this point in the history
…f path
  • Loading branch information
GnomedDev committed Sep 19, 2024
1 parent 7bc30a7 commit 925c1c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl bool {
/// assert_eq!(a, 1);
/// ```
#[stable(feature = "lazy_bool_to_option", since = "1.50.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "bool_then")]
#[inline]
pub fn then<T, F: FnOnce() -> T>(self, f: F) -> Option<T> {
if self { Some(f()) } else { None }
Expand Down

0 comments on commit 925c1c4

Please sign in to comment.