Skip to content

Commit

Permalink
Eliminate itertools dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and Mark-Simulacrum committed Jan 8, 2024
1 parent 607097c commit 3e3704e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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::<Vec<_>>();

bail!(
"the following members of the \"{}\" team do not have discord_ids: {}",
Expand Down

0 comments on commit 3e3704e

Please sign in to comment.