From aeb7fe72f2ecb167c79ed43193cf5a5d4ada8ca6 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Mon, 7 Aug 2023 07:56:51 +0200 Subject: [PATCH] Make Clippy happy and fix MSRV build --- scripts/all-tests.sh | 4 ++++ src/dimension/dimension_trait.rs | 2 +- src/zip/ndproducer.rs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 2167f3451..a89b496e0 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -9,6 +9,10 @@ CHANNEL=$2 if [ "$CHANNEL" = "1.51.0" ]; then cargo update --package rayon --precise 1.5.3 cargo update --package rayon-core --precise 1.9.3 + cargo update --package quote --precise 1.0.30 + cargo update --package proc-macro2 --precise 1.0.65 + cargo update --package rmp --precise 0.8.11 + cargo update --package serde_json --precise 1.0.99 cargo update --package serde --precise 1.0.156 cargo update --package thiserror --precise 1.0.39 cargo update --package once_cell --precise 1.14.0 diff --git a/src/dimension/dimension_trait.rs b/src/dimension/dimension_trait.rs index 7181d2268..7a3955fb7 100644 --- a/src/dimension/dimension_trait.rs +++ b/src/dimension/dimension_trait.rs @@ -90,7 +90,7 @@ pub trait Dimension: fn size_checked(&self) -> Option { self.slice() .iter() - .fold(Some(1), |s, &a| s.and_then(|s_| s_.checked_mul(a))) + .try_fold(1_usize, |s, &a| s.checked_mul(a)) } #[doc(hidden)] diff --git a/src/zip/ndproducer.rs b/src/zip/ndproducer.rs index 0ddf33faf..4eb986d37 100644 --- a/src/zip/ndproducer.rs +++ b/src/zip/ndproducer.rs @@ -1,7 +1,7 @@ use crate::imp_prelude::*; use crate::Layout; use crate::NdIndex; -#[cfg(not(features = "std"))] +#[cfg(not(feature = "std"))] use alloc::vec::Vec; /// Argument conversion into a producer.