diff --git a/Cargo.lock b/Cargo.lock index 07188e615..d98c10bdd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -623,15 +623,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" -[[package]] -name = "itertools" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.2" @@ -1005,7 +996,6 @@ dependencies = [ "duct", "env_logger", "indexmap 2.1.0", - "itertools", "log", "rayon", "regex", diff --git a/Cargo.toml b/Cargo.toml index 30e4cfaa7..6f73daa0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ base64 = "0.13.0" dialoguer = "0.10.1" env_logger = { version = "0.9.0", default-features = false } indexmap = "2" -itertools = "0.12" log = "0.4" rayon = "1.5" regex = "1.5.5" diff --git a/src/validate.rs b/src/validate.rs index 81584fca5..5357e4026 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -3,7 +3,6 @@ use crate::github::GitHubApi; use crate::schema::{Bot, Email, Permissions, Team, TeamKind, TeamPeople, ZulipGroupMember}; use crate::zulip::ZulipApi; use anyhow::{bail, Error}; -use itertools::Itertools as _; use log::{error, warn}; use regex::Regex; use std::collections::hash_map::{Entry, HashMap}; @@ -635,9 +634,10 @@ fn validate_discord_team_members_have_discord_ids(data: &Data, errors: &mut Vec< if team.discord_roles().is_some() && team.name() != "all" { let team_members = team.members(data)?; if team_members.len() != team.discord_ids(data)?.len() { - let mut missing_discord_id = team_members + let missing_discord_id = team_members .into_iter() - .filter(|name| data.person(name).map(|p| p.discord_id()) == Some(None)); + .filter(|name| data.person(name).map(|p| p.discord_id()) == Some(None)) + .collect::>(); bail!( "the following members of the \"{}\" team do not have discord_ids: {}",