diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e79912f..6e6aede7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,16 +35,16 @@ repos: hooks: - id: markdownlint-cli2 - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.5 + rev: v0.9.0.6 hooks: - id: shellcheck - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell args: [--ignore-words=.codespellignore] - repo: https://github.com/sirosen/check-jsonschema - rev: 0.26.3 + rev: 0.27.0 hooks: - id: check-github-actions - id: check-github-workflows diff --git a/src/codec/tcp.rs b/src/codec/tcp.rs index e3ee35ba..547c0cb1 100644 --- a/src/codec/tcp.rs +++ b/src/codec/tcp.rs @@ -295,7 +295,7 @@ mod tests { assert_eq!(buf[5], 0x6); assert_eq!(buf[6], UNIT_ID); - _ = buf.split_to(7); + drop(buf.split_to(7)); let pdu: Bytes = req.try_into().unwrap(); assert_eq!(buf, pdu); } diff --git a/src/lib.rs b/src/lib.rs index 1c0713a8..c1be935c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,15 +1,19 @@ // SPDX-FileCopyrightText: Copyright (c) 2017-2023 slowtec GmbH // SPDX-License-Identifier: MIT OR Apache-2.0 -#![warn(rustdoc::broken_intra_doc_links)] #![doc = include_str!("../README.md")] -#![warn(rust_2018_idioms)] -#![warn(rust_2021_compatibility)] +// Opt-in for allowed-by-default lints (in alphabetical order) +// See also: +#![warn(future_incompatible)] +#![warn(let_underscore)] #![warn(missing_debug_implementations)] //#![warn(missing_docs)] // TODO +#![warn(rust_2018_idioms)] +#![warn(rust_2021_compatibility)] #![warn(unreachable_pub)] #![warn(unsafe_code)] -#![warn(rustdoc::broken_intra_doc_links)] +#![warn(unused)] +// Clippy lints #![warn(clippy::pedantic)] // Additional restrictions #![warn(clippy::clone_on_ref_ptr)]