pub fn merge_index(_key: &[u8], old_indices: Option<&[u8]>, new_index: &[u8]) -> Option<Vec<u8>> {
    let mut ret = old_indices.map_or_else(Vec::new, |old| old.to_vec());
    if !ret.is_empty() {
        ret.extend_from_slice(&[utils::SEMICOLON]);
    }
    ret.extend_from_slice(new_index);
    Some(ret)
}
/// If key exists, add value to existing values - join with a semicolon
If key exists, add value to existing values - join with a semicolon
If key exists add value to existing values - join with a semicolon
pub fn merge_index(_key: &[u8], old_indices: Option<&[u8]>, new_index: &[u8]) -> Option<Vec<u8>> {
    let mut ret = old_indices.map_or_else(Vec::new, |old| old.to_vec());
    if !ret.is_empty() {
        ret.extend_from_slice(&[utils::SEMICOLON]);
    }
    ret.extend_from_slice(new_index);
    Some(ret)
}
pub fn merge_index ( _key : & [ u8 ] , old_indices : Option < & [ u8 ] > , new_index : & [ u8 ] ) -> Option < Vec < u8 > > { let mut ret = old_indices . map_or_else ( Vec :: new , | old | old . to_vec ( ) ) ; if ! ret . is_empty ( ) { ret . extend_from_slice ( & [ utils :: SEMICOLON ] ) ; } ret . extend_from_slice ( new_index ) ; Some ( ret ) }
If key exists, add value to existing values - join with a semicolon
If key exists add value to existing values - join with a semicolon
_key
&[u8]
old_indices
Option<&[u8]>
new_index
&[u8]
_key
&[u8]
old_indices
Option<&[u8]>
new_index
&[u8]