File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1243,6 +1243,8 @@ fn generate_all(cache: &mut HashMap<String, Article>) {
12431243 let html_footer = fs:: read ( "footer.html" ) . unwrap ( ) ;
12441244
12451245 let git_stats = git_get_articles_stats ( ) ;
1246+ // We need ordering to avoid spurious diffs in the search index,
1247+ // due to the same file having suddenly a different index.
12461248 assert ! (
12471249 git_stats. is_sorted_by(
12481250 |a, b| a. path_from_git_root. cmp( & b. path_from_git_root) != Ordering :: Greater
@@ -1263,13 +1265,6 @@ fn generate_all(cache: &mut HashMap<String, Article>) {
12631265 {
12641266 let start = std:: time:: Instant :: now ( ) ;
12651267 let search_index_file = File :: create ( "search_index.postcard" ) . unwrap ( ) ;
1266- // Sort to avoid spurious diffs (and cache busting in the browser).
1267- // FIXME: This does not work yet.
1268- search_index
1269- . trigram_to_file_idx
1270- . values_mut ( )
1271- . for_each ( |v| v. sort_by ( |a, b| a. 0 . cmp ( & b. 0 ) ) ) ;
1272- search_index. files . sort_by ( |a, b| a. cmp ( & b) ) ;
12731268
12741269 postcard:: to_io ( & search_index, search_index_file) . unwrap ( ) ;
12751270 println ! (
You can’t perform that action at this time.
0 commit comments