on master help sign in
build_assets.rs: Sort first to make dependencies.dedup() actually useful
commit122cae7902db9cafa138d115b7546f72cdf6b3ae authorMartin Nordholts <enselic@gmail.com> dateWed 22 Sep 2021, 09:22 (5 years ago) parent44a332c
1 file changed+3−2
src/assets/build_assets.rs+3−2
src/assets/build_assets.rs+3−2
@@ -20,8 +20,8 @@ type SyntaxToDependencies = HashMap<SyntaxName, Vec<OtherSyntax>>;
2020type SyntaxToDependents<'a> = HashMap<SyntaxName, Vec<OtherSyntax>>;
2121
2222/// Represents some other `*.sublime-syntax` file, i.e. another [SyntaxDefinition].
23−#[derive(Debug, Eq, PartialEq, Clone, Hash)]
24−enum OtherSyntax {
23+#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Clone, Hash)]
24+pub(crate) enum OtherSyntax {
2525 /// By name. Example YAML: `include: C.sublime-syntax` (name is `"C"`)
2626 ByName(String),
2727
@@ -304,6 +304,7 @@ fn dependencies_for_syntax(syntax: &SyntaxDefinition) -> Vec<OtherSyntax> {
304304 .collect();
305305
306306 // No need to track a dependency more than once
307+ dependencies.sort();
307308 dependencies.dedup();
308309
309310 dependencies