2 releases

0.1.1 Nov 9, 2022
0.1.0 Nov 8, 2022

#2525 in Rust patterns

Download history 22/week @ 2024-07-26 3/week @ 2024-08-02 3/week @ 2024-09-20 71/week @ 2024-09-27 1687/week @ 2024-10-04 3263/week @ 2024-10-11 3637/week @ 2024-10-18 3261/week @ 2024-10-25 2020/week @ 2024-11-01

13,149 downloads per month

MIT/Apache

5KB

debug-map-sorted

crates.io

An implementation of Debug on a wrapper for HashMap which displays the output in sorted order.

See SortedHashMapDebugOutput for more info.

Example usage

# use std::collections::HashMap;
use debug_map_sorted::SortedOutputExt;

let data: HashMap<usize, &'static str> = [(0, "zero"), (1, "one"), (2, "two")]
                                                .into_iter().collect();
assert_eq!(
    format!("{:?}", data.sorted_debug()),
    "{0: \"zero\", 1: \"one\", 2: \"two\"}"
);

Dependencies

~425KB