You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: repeat.rs
    path of file: ./repos/irisia-gui/irisia/src/structure
    
    the code of the file until where you have to start completion: use std::{
    collections::{hash_map::Entry, HashMap},
    hash::Hash,
};

use smallvec::SmallVec;

use crate::{update_with::SpecificUpdate, Result, UpdateWith};

use super::{MapVisit, Visit,
    
    fn update_with(&mut self, mut update: Repeat<I>, mut equality_matters: bool) -> bool {
        let mut insert = |key: K, value: U, equality_matters: &mut bool| match self.map.entry(key) {
            Entry::Occupied(mut model) => {
                *equality_matters &= model.get_mut().update_with(value, *equality_matters);
            }
            Entry::Vacant(model) => {
                model.insert(T::create_with(value));
                *equality_matters = false;
            }
        };

        let mut old_keys = self.order.iter_mut();

        for ((k, v), vec_k) in (&mut update.0).zip(&mut old_keys) {
            if equality_matters {
                equality_matters = k == *vec_k;
            }
            *vec_k = k.clone();

            insert(k, v, &mut equality_matters);
        }

        if old_keys.len() != 0 {
            let old_key_len = old_keys.len();
            self.order.truncate(self.order.len() - old_key_len);
            return false;
        }

        for (k, v) in update.0 {
            equality_matters = false;
            self.order.push(k.clone());
            insert(k, v, &mut equality_matters);
        }

        equality_matters
    }