From 633b6ae6b279eaa9d6713dd90fd9eaecb3563ba4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 12 Sep 2023 22:34:48 -0600 Subject: [PATCH] Ignore needless_doctest_main clippy lint warning: needless `fn main` in doctest --> src/lib.rs:22:5 | 22 | //! fn main() { | _____^ 23 | | //! let mut buffer = itoa::Buffer::new(); 24 | | //! let printed = buffer.format(128u64); 25 | | //! assert_eq!(printed, "128"); 26 | | //! } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main = note: `-W clippy::needless-doctest-main` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_doctest_main)]` --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 1683d24..0db5995 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,6 +37,7 @@ clippy::cast_possible_truncation, clippy::expl_impl_clone_on_copy, clippy::must_use_candidate, + clippy::needless_doctest_main, clippy::unreadable_literal )]