Skip to content

Commit 07c8ac4

Browse files
committed
Ignore needless_doctest_main clippy lint
warning: needless `fn main` in doctest --> unindent/src/lib.rs:24:5 | 24 | //! use unindent::unindent; | _____^ 25 | | //! 26 | | //! fn main() { 27 | | //! let indented = " ... | 30 | | //! assert_eq!("line one\nline two", unindent(indented)); 31 | | //! } | |_____^ | = 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)]` warning: needless `fn main` in doctest --> unindent/src/lib.rs:38:5 | 38 | //! use unindent::Unindent; | _____^ 39 | | //! 40 | | //! fn main() { 41 | | //! let indented = format!(" ... | 44 | | //! assert_eq!("line one\nline two", indented.unindent()); 45 | | //! } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
1 parent 4d305be commit 07c8ac4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

unindent/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
clippy::missing_panics_doc,
5151
clippy::module_name_repetitions,
5252
clippy::must_use_candidate,
53+
clippy::needless_doctest_main,
5354
clippy::trivially_copy_pass_by_ref,
5455
clippy::type_complexity
5556
)]

0 commit comments

Comments
 (0)