Skip to content

Commit

Permalink
Ignore needless_late_init Clippy lint in test
Browse files Browse the repository at this point in the history
    error: unneeded late initalization
      --> tests/test_generics.rs:90:5
       |
    90 |     let mut instance: EnumCompound<DisplayOnly, DebugOnly, NoFormat>;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
    help: declare `instance` here
       |
    92 |     let mut instance: EnumCompound<DisplayOnly, DebugOnly, NoFormat> = EnumCompound::DisplayDebug(DisplayOnly, DebugOnly);
       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
dtolnay committed Dec 8, 2021
1 parent 5a03b0a commit 604e47c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_generics.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![deny(clippy::all, clippy::pedantic)]
#![allow(clippy::needless_late_init)]

use std::fmt::{self, Debug, Display};
use thiserror::Error;
Expand Down

0 comments on commit 604e47c

Please sign in to comment.