test: add (and fix) more deny lints

Signed-off-by: Stephen Waits <steve@waits.net>
This commit is contained in:
swaits committed 2023-02-13 12:35:26 -07:00
1 parent f3deb17832
commit 0641f73ab3
2 files changed
+28 -11

No files matched your search

+1 -1
View File
@@ -96,7 +96,7 @@ pub struct HeightVector<const N: usize> {
impl<const N: usize> HeightVector<N> { impl<const N: usize> HeightVector<N> {
/// A new height vector is a random unit vector /// A new height vector is a random unit vector
pub(crate) fn random() -> Self { pub(crate) fn random() -> Self {
let mut rng = rand::thread_rng(); let mut rng = thread_rng();
let mut vec = [0.0; N]; let mut vec = [0.0; N];
for i in vec.iter_mut().take(N) { for i in vec.iter_mut().take(N) {
*i = rng.gen::<FloatType>() - 0.5; *i = rng.gen::<FloatType>() - 0.5;
+27 -10
View File
@@ -93,16 +93,33 @@
//! ``` //! ```
//! //!
#![deny(clippy::all)] #![deny(
#![deny(clippy::correctness)] clippy::all,
#![deny(clippy::style)] clippy::correctness,
#![deny(clippy::suspicious)] clippy::style,
#![deny(clippy::complexity)] clippy::suspicious,
#![deny(clippy::perf)] clippy::complexity,
#![deny(clippy::cargo)] clippy::perf,
#![deny(clippy::pedantic)] clippy::cargo,
#![deny(clippy::nursery)] clippy::pedantic,
#![deny(clippy::unwrap_used)] clippy::nursery,
clippy::unwrap_used
)]
#![deny(
anonymous_parameters,
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
nonstandard_style,
rust_2018_idioms,
single_use_lifetimes,
trivial_casts,
trivial_numeric_casts,
// unreachable_pub, // disagrees with clippy::nurclippy::nursery as of 13-02-2023
unused_extern_crates,
unused_qualifications,
variant_size_differences
)]
#![allow(clippy::type_repetition_in_bounds)] #![allow(clippy::type_repetition_in_bounds)]
mod height_vector; mod height_vector;