Skip to content

Commit

Permalink
Merge #457
Browse files Browse the repository at this point in the history
457: Fix clippy false positive r=jonasbb a=jonasbb

rust-lang/rust-clippy#8867

bors merge

Co-authored-by: Jonas Bushart <jonas@bushart.org>
  • Loading branch information
bors[bot] and jonasbb committed May 23, 2022
2 parents 337b66b + ade8109 commit b3d4156
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 6 deletions.
13 changes: 9 additions & 4 deletions serde_with/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
#![doc(test(no_crate_inject))]
#![doc(html_root_url = "https://docs.rs/serde_with/1.13.0")]
#![cfg_attr(docsrs, feature(doc_cfg))]
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
// https://github.com/rust-lang/rust-clippy/issues/8560
#![allow(unknown_lints, clippy::only_used_in_recursion)]
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8560
clippy::only_used_in_recursion,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]
#![no_std]

//! [![crates.io badge](https://img.shields.io/crates/v/serde_with.svg)](https://crates.io/crates/serde_with/)
Expand Down
11 changes: 9 additions & 2 deletions serde_with/tests/base64.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// This allows the tests to be written more uniform and not have to special case the last clone().
#![allow(clippy::redundant_clone)]
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
// This allows the tests to be written more uniform and not have to special case the last clone().
clippy::redundant_clone,
)]

mod utils;

Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/chrono.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

extern crate alloc;

mod utils;
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/derives/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

mod deserialize_fromstr;
mod serialize_display;
#[path = "../utils.rs"]
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/hex.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/indexmap.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/json.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

mod utils;

use crate::utils::is_equal;
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/rust.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

extern crate alloc;

mod utils;
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/serde_as/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

extern crate alloc;

mod collections;
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/time_0_3.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
8 changes: 8 additions & 0 deletions serde_with/tests/with_prefix.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#![allow(
// clippy is broken and shows wrong warnings
// clippy on stable does not know yet about the lint name
unknown_lints,
// https://github.com/rust-lang/rust-clippy/issues/8867
clippy::derive_partial_eq_without_eq,
)]

extern crate alloc;

mod utils;
Expand Down

0 comments on commit b3d4156

Please sign in to comment.