Files
alibabacloud-openapi-signature/src/util/map_util.rs
2023-09-03 18:02:54 +08:00

11 lines
330 B
Rust

use std::collections::BTreeMap;
pub(crate) trait BTreeMapAddKv<K: Ord, V> {
fn insert_kv(&mut self, key: impl Into<K>, value: impl Into<V>);
}
impl<K: Ord, V> BTreeMapAddKv<K, V> for BTreeMap<K, V> {
fn insert_kv(&mut self, key: impl Into<K>, value: impl Into<V>) {
self.insert(key.into(), value.into());
}
}