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: lib.rs
    path of file: ./repos/lnx/lnx-engine/engine/src
    
    the code of the file until where you have to start completion: use std::sync::Arc;

use anyhow::{Error, Result};
use arc_swap::ArcSwap;
use hashbrown::HashMap;
use parking_lot::Mutex;
use search_index
    
    pub async fn remove_index(&self, name: &str) -> Result<()> {
        let indexes = {
            let indexes = self.indexes.load();

            let mut indexes = indexes.as_ref().clone();
            if let Some(old) = indexes.remove(name) {
                old.destroy().await?;
            };

            indexes
        };

        self.indexes.store(Arc::new(indexes));

        {
            self.declarations.lock().remove(name);
        }

        Ok(())
    }