pub fn insert(&mut self, key: K, value: V) {
        // reverse binary search
        let index = match self.data.binary_search_by(|(probe_k, _)| key.cmp(probe_k)) {
            Ok(i) => i,
            Err(i) => i
        };
        self.data.insert(index, (key, value));
    }
/// Insert a value with a given priority key into the queue
Insert a value with a given priority key into the queue
Insert a value with a given priority key into the queue
pub fn insert(&mut self, key: K, value: V) {
        // reverse binary search
        let index = match self.data.binary_search_by(|(probe_k, _)| key.cmp(probe_k)) {
            Ok(i) => i,
            Err(i) => i
        };
        self.data.insert(index, (key, value));
    }
pub fn insert ( & mut self , key : K , value : V ) { // reverse binary search let index = match self . data . binary_search_by ( | ( probe_k , _ ) | key . cmp ( probe_k ) ) { Ok ( i ) => i , Err ( i ) => i } ; self . data . insert ( index , ( key , value ) ) ; }
Insert a value with a given priority key into the queue
Insert a value with a given priority key into the queue
&mut self
key
K
value
V
&mut self
key
K
value
V