Skip to content

Commit f7a4632

Browse files
committed
Use indexmap in Specializationpriorities
1 parent 1356f6d commit f7a4632

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

chalk-solve/src/coherence.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use petgraph::prelude::*;
22

3+
use indexmap::IndexMap;
4+
35
use crate::solve::Solver;
46
use crate::RustIrDatabase;
57
use chalk_ir::interner::Interner;
68
use chalk_ir::{self, ImplId, TraitId};
7-
use std::collections::BTreeMap;
89
use std::fmt;
910
use std::sync::Arc;
1011

@@ -42,13 +43,13 @@ impl<I: Interner> std::error::Error for CoherenceError<I> {}
4243
/// This basically encodes which impls specialize one another.
4344
#[derive(Clone, Debug, Default, PartialEq, Eq)]
4445
pub struct SpecializationPriorities<I: Interner> {
45-
map: BTreeMap<ImplId<I>, SpecializationPriority>,
46+
map: IndexMap<ImplId<I>, SpecializationPriority>,
4647
}
4748

4849
impl<I: Interner> SpecializationPriorities<I> {
4950
pub fn new() -> Self {
5051
Self {
51-
map: BTreeMap::new(),
52+
map: IndexMap::new(),
5253
}
5354
}
5455

0 commit comments

Comments
 (0)