From 7caa55129ee67cd216756fcd43f0c14932a37bc6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 10 Jun 2025 19:55:30 -0700 Subject: [PATCH] use BTreeMap for consistent order --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/main.rs | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d53fd19..8937605 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1255,9 +1255,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "submissions-api" -version = "0.8.0-pre4" +version = "0.8.0-pre5" source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/" -checksum = "b2c8194860f654fa08ec64cafc133eb4e01e9371715e1badad6ec37796abadc1" +checksum = "dd70887bbae8ecea987f4334c6f97e78ed59b264f8957c2279348925de1be130" dependencies = [ "chrono", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index 6e8b43f..588c545 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ clap = { version = "4.4.2", features = ["derive"] } futures = "0.3.31" rand = "0.9.1" siphasher = "1.0.1" -submissions-api = { version = "0.8.0-pre4", registry = "strafesnet" } +submissions-api = { version = "0.8.0-pre5", registry = "strafesnet" } tokio = { version = "1.42.0", features = ["fs", "macros", "rt-multi-thread"] } [profile.release] diff --git a/src/main.rs b/src/main.rs index 56e20fb..5326a3a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ use futures::{StreamExt,TryStreamExt}; use rand::seq::SliceRandom; use std::io::Write; use std::path::PathBuf; -use std::collections::HashMap; const READ_CONCURRENCY:usize=16; const REMOTE_CONCURRENCY:usize=16; @@ -621,7 +620,7 @@ async fn release(config:ReleaseConfig)->Result<(),ReleaseError>{ const PEAK_HOURS:i64=-7*ONE_HOUR; // determine maps ready to be released - let mut submissions_pending_release=HashMap::new(); + let mut submissions_pending_release=std::collections::BTreeMap::new(); { println!("Downloading submissions pending release..."); let mut page=1; @@ -659,7 +658,7 @@ async fn release(config:ReleaseConfig)->Result<(),ReleaseError>{ // if it's in the past, generate a Friday 10AM timestamp instead let it={ println!("Determining release dates..."); - let mut latest_date=HashMap::new(); + let mut latest_date=std::collections::HashMap::new(); let mut page=1; loop{ let maps=api.get_maps(submissions_api::types::GetMapsRequest{