mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 08:11:04 +00:00
chore: Little clean ups of meilidb-core
This commit is contained in:
@ -5,6 +5,10 @@ pub struct ReorderedAttrs {
|
||||
}
|
||||
|
||||
impl ReorderedAttrs {
|
||||
pub fn new() -> ReorderedAttrs {
|
||||
ReorderedAttrs { count: 0, reorders: Vec::new() }
|
||||
}
|
||||
|
||||
pub fn insert_attribute(&mut self, attribute: u16) {
|
||||
self.reorders.resize(attribute as usize + 1, None);
|
||||
self.reorders[attribute as usize] = Some(self.count as u16);
|
||||
|
Reference in New Issue
Block a user