Use BTreeMap in build_sidebar_items
This ensures that later when generating HTML, the JSON will be sorted aswell. We now have a deterministic build of sidebar-items.js
This commit is contained in:
parent
e12671b4d7
commit
32956cb565
@ -37,7 +37,7 @@ pub use self::ExternalLocation::*;
|
||||
use std::ascii::OwnedAsciiExt;
|
||||
use std::cell::RefCell;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::default::Default;
|
||||
use std::fmt;
|
||||
use std::fs::{self, File};
|
||||
@ -1298,8 +1298,9 @@ impl Context {
|
||||
}
|
||||
}
|
||||
|
||||
fn build_sidebar_items(&self, m: &clean::Module) -> HashMap<String, Vec<NameDoc>> {
|
||||
let mut map = HashMap::new();
|
||||
fn build_sidebar_items(&self, m: &clean::Module) -> BTreeMap<String, Vec<NameDoc>> {
|
||||
// BTreeMap instead of HashMap to get a sorted output
|
||||
let mut map = BTreeMap::new();
|
||||
for item in &m.items {
|
||||
if self.ignore_private_item(item) { continue }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user