Skip to content

Commit

Permalink
Use FxHashSet
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Dec 8, 2023
1 parent afab28f commit 0cfc423
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
//! Build a report as clear as possible as to why
//! dependency solving failed.

use std::collections::HashSet;
use std::fmt;
use std::ops::{Deref, DerefMut};

use rustc_hash::FxHashSet;

use crate::package::Package;
use crate::term::Term;
use crate::type_aliases::Map;
Expand Down Expand Up @@ -74,8 +75,8 @@ pub struct Derived<P: Package, VS: VersionSet> {

impl<P: Package, VS: VersionSet> DerivationTree<P, VS> {
/// Get all [Package]s referred to in the deriviation tree.
pub fn packages(&self) -> HashSet<&P> {
let mut packages = HashSet::default();
pub fn packages(&self) -> FxHashSet<&P> {
let mut packages = FxHashSet::default();
match self {
Self::External(external) => match external {
External::FromDependencyOf(p, _, p2, _) => {
Expand Down

0 comments on commit 0cfc423

Please sign in to comment.