Skip to content

Commit

Permalink
Update lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Nov 5, 2022
1 parent 27ea0d4 commit e5e2a60
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
clippy::clone_on_copy,
clippy::cmp_owned,
clippy::cognitive_complexity,
clippy::missing_const_for_fn
clippy::missing_const_for_fn,
clippy::unwrap_used
)]

#[cfg(not(all(
Expand Down
4 changes: 2 additions & 2 deletions tests/quickcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn weekday_supports_arbitrary(w: Weekday) -> bool {
#[quickcheck]
fn weekday_can_shrink(w: Weekday) -> bool {
match w {
Weekday::Monday => w.shrink().next() == None,
Weekday::Monday => w.shrink().next().is_none(),
_ => w.shrink().next() == Some(w.previous()),
}
}
Expand All @@ -133,7 +133,7 @@ fn month_supports_arbitrary(m: Month) -> bool {
#[quickcheck]
fn month_can_shrink(m: Month) -> bool {
match m {
Month::January => m.shrink().next() == None,
Month::January => m.shrink().next().is_none(),
_ => m.shrink().next() == Some(m.previous()),
}
}
Expand Down
6 changes: 5 additions & 1 deletion time-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
unused_qualifications,
variant_size_differences
)]
#![allow(clippy::missing_const_for_fn, clippy::redundant_pub_crate)]
#![allow(
clippy::missing_const_for_fn, // useless in proc macro
clippy::redundant_pub_crate, // suggests bad style
clippy::option_if_let_else, // suggests terrible code
)]

#[macro_use]
mod quote;
Expand Down
7 changes: 6 additions & 1 deletion time/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@
unused_qualifications,
variant_size_differences
)]
#![allow(clippy::redundant_pub_crate)]
#![allow(
clippy::redundant_pub_crate, // suggests bad style
clippy::option_if_let_else, // suggests terrible code
clippy::unused_peekable, // temporary due to bug: remove when Rust 1.66 is released
clippy::std_instead_of_core, // temporary due to bug: remove when Rust 1.66 is released
)]
#![doc(html_favicon_url = "https://avatars0.githubusercontent.com/u/55999857")]
#![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55999857")]
#![doc(test(attr(deny(warnings))))]
Expand Down

0 comments on commit e5e2a60

Please sign in to comment.