From be9ed869c03501e2f2e220f66591ac9cfefc6be6 Mon Sep 17 00:00:00 2001 From: Russell Banks <74878137+russellbanks@users.noreply.github.com> Date: Fri, 18 Oct 2024 00:20:59 +0100 Subject: [PATCH] Migrate to Rust 1.82 --- src/commands/remove_dead_versions.rs | 4 ++-- src/types/package_identifier.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/remove_dead_versions.rs b/src/commands/remove_dead_versions.rs index c525cd35..1e3f34eb 100644 --- a/src/commands/remove_dead_versions.rs +++ b/src/commands/remove_dead_versions.rs @@ -114,8 +114,8 @@ impl RemoveDeadVersions { progress_bar.enable_steady_tick(SPINNER_TICK_RATE); for version in versions.iter().filter(|&version| { - self.before.as_ref().map_or(true, |before| version < before) - && self.after.as_ref().map_or(true, |after| version > after) + self.before.as_ref().is_none_or(|before| version < before) + && self.after.as_ref().is_none_or(|after| version > after) }) { if progress_bar.is_finished() { progress_bar.reset(); diff --git a/src/types/package_identifier.rs b/src/types/package_identifier.rs index 2640d175..b5361a88 100644 --- a/src/types/package_identifier.rs +++ b/src/types/package_identifier.rs @@ -108,7 +108,7 @@ pub enum PackageIdentifierError { mod tests { use crate::types::package_identifier::{PackageIdentifier, PackageIdentifierError}; use const_format::str_repeat; - use itertools::repeat_n; + use std::iter::repeat_n; // Replace itertools::intersperse with std::iter::Intersperse once it's stabilised