mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
Return BTreeMap instead of HashMap from get_info()
BTreeMap is sorted by keys when iterated, making it easier to find the required line.
This commit is contained in:
@@ -13,7 +13,7 @@ extern crate human_panic;
|
||||
extern crate num_traits;
|
||||
extern crate serde_json;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::BTreeMap;
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::CString;
|
||||
use std::fmt::Write;
|
||||
@@ -434,7 +434,7 @@ pub unsafe extern "C" fn dc_get_info(context: *mut dc_context_t) -> *mut libc::c
|
||||
}
|
||||
|
||||
fn render_info(
|
||||
info: HashMap<&'static str, String>,
|
||||
info: BTreeMap<&'static str, String>,
|
||||
) -> std::result::Result<String, std::fmt::Error> {
|
||||
let mut res = String::new();
|
||||
for (key, value) in &info {
|
||||
|
||||
Reference in New Issue
Block a user