Crates.io | key-vec |
lib.rs | key-vec |
version | 0.4.1 |
source | src |
created_at | 2019-08-25 03:29:09.380314 |
updated_at | 2023-07-04 16:08:04.114041 |
description | Vec of key-value pairs sorted by key |
homepage | |
repository | https://gitlab.com/spearman/key-vec |
max_upload_size | |
id | 159473 |
size | 30,559 |
key_vec
Vec of key-value pairs sorted by key
let mut v = KeyVec::<i32, char>::new();
v.extend (vec![(10i32, 'a'), (-1, 'b'), (3, 'c'), (-1, 'd')].into_iter());
assert_eq!(*v, vec![(-1i32, 'd'), (3, 'c'), (10, 'a')]);