Skip to content

Commit

Permalink
Fix test snapshot duplicate_names changing due to inconsistent orde…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
YetAnotherClown committed Jul 16, 2024
1 parent b12b202 commit c08f290
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extractor/src/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ macro_rules! define_tags {
}

#[allow(unused)]
#[derive(Debug, PartialEq, Hash, Eq)]
#[derive(Debug, PartialEq, Hash, Eq, PartialOrd, Ord)]
pub enum TagType {
$( $variant_name, )*
}
Expand Down
4 changes: 2 additions & 2 deletions extractor/src/tags/validation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::diagnostic::Diagnostic;

use super::{Tag, TagType};
use std::collections::HashMap;
use std::collections::{BTreeMap, HashMap};

static MUTUALLY_EXCLUSIVE: &[(TagType, TagType)] = &[
// Kind tags
Expand Down Expand Up @@ -77,7 +77,7 @@ fn build_diagnostic(
pub fn validate_global_tags(tags: &[Tag]) -> Vec<Diagnostic> {
let mut diagnostics: Vec<Diagnostic> = Vec::new();

let mut name_occurrences: HashMap<(TagType, String), (usize, Vec<Tag>)> = HashMap::new();
let mut name_occurrences: BTreeMap<(TagType, String), (usize, Vec<Tag>)> = BTreeMap::new();

for tag in tags {
let name = match tag {
Expand Down

0 comments on commit c08f290

Please sign in to comment.