refactor: simplify RLE allocation code
@@ -60,13 +60,8 @@ impl RLE {
/// the rows in the column can be inserted in any order and the correct
/// ordinal relationship will exist between the encoded values.
pub fn with_dictionary(dictionary: BTreeSet<String>) -> Self {
- let mut index_entries = Vec::with_capacity(dictionary.len() + 1);
- index_entries.push(String::from(""));
-
- let mut _self = Self {
- index_entries,
- ..Self::default()
- };
+ let mut _self = Self::default();
+ _self.index_entries.reserve_exact(dictionary.len());
for mut entry in dictionary.into_iter() {
let next_id = _self.next_encoded_id();
