Skip to content

Commit

Permalink
Ignore new_without_default clippy lint
Browse files Browse the repository at this point in the history
    error: you should consider adding a `Default` implementation for `UnitDeserializer<E>`
       --> serde/src/de/value.rs:144:5
        |
    144 | /     pub fn new() -> Self {
    145 | |         UnitDeserializer {
    146 | |             marker: PhantomData,
    147 | |         }
    148 | |     }
        | |_____^
        |
        = note: `-D clippy::new-without-default` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
    help: try adding this
        |
    142 + impl<E> Default for UnitDeserializer<E> {
    143 +     fn default() -> Self {
    144 +         Self::new()
    145 +     }
    146 + }
        |
  • Loading branch information
dtolnay committed Jul 12, 2022
1 parent 44b9496 commit 7cc6f7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions serde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
explicit_auto_deref,
let_underscore_drop,
map_err_ignore,
new_without_default,
result_unit_err,
wildcard_imports,
// not practical
Expand Down

0 comments on commit 7cc6f7f

Please sign in to comment.