Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts committed Feb 23, 2024
1 parent 1787333 commit a3413e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/project/grouped_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ impl<'p> GroupedEnvironment<'p> {
}

/// Returns the features of the group
pub fn features(
&self,
) ->impl Iterator<Item = &'p Feature> + DoubleEndedIterator + 'p {
pub fn features(&self) -> impl Iterator<Item = &'p Feature> + DoubleEndedIterator + 'p {
match self {
GroupedEnvironment::Group(group) => Either::Left(group.features(true)),
GroupedEnvironment::Environment(env) => Either::Right(env.features(true)),
Expand Down
21 changes: 11 additions & 10 deletions src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mod solve_group;
pub mod virtual_packages;

use indexmap::{Equivalent, IndexMap, IndexSet};
use itertools::Itertools;
use miette::{IntoDiagnostic, NamedSource, WrapErr};
use once_cell::sync::OnceCell;
use rattler_conda_types::{Channel, GenericVirtualPackage, Platform, Version};
Expand Down Expand Up @@ -302,15 +301,17 @@ impl Project {
/// Return the grouped environments, which are all solve-groups and the environments that need to be solved.
pub fn grouped_environments(&self) -> Vec<GroupedEnvironment> {
let mut environments = HashSet::new();
environments.extend(self
.environments()
.into_iter()
.filter(|env| env.solve_group().is_none())
.map(GroupedEnvironment::from))
environments.extend(self
.solve_groups()
.into_iter()
.map(GroupedEnvironment::from));
environments.extend(
self.environments()
.into_iter()
.filter(|env| env.solve_group().is_none())
.map(GroupedEnvironment::from),
);
environments.extend(
self.solve_groups()
.into_iter()
.map(GroupedEnvironment::from),
);
environments.into_iter().collect()
}

Expand Down

0 comments on commit a3413e6

Please sign in to comment.