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: chunk_subscriptions.rs
    path of file: ./repos/feather/feather/server/src
    
    the code of the file until where you have to start completion: use ahash::AHashMap;
use base::ChunkPosition;
use common::{events::ViewUpdateEvent, view::View, Game};
use ecs::{SysResult, SystemExecutor};
use quill_common::events::EntityRemoveEvent;
use utils::vec_remove_item;

use crate::{ClientId, Server};

/// Data structure to query which clients should
/// receive updates from a given chunk, fast.
#[derive(Default)]
pub struct Ch
    
fn update_chunk_subscriptions(game: &mut Game, server: &mut Server) -> SysResult {
    // Update players whose views have changed
    for (_, (event, &client_id)) in game.ecs.query::<(&ViewUpdateEvent, &ClientId)>().iter() {
        for new_chunk in event.new_view.difference(event.old_view) {
            server
                .chunk_subscriptions
                .chunks
                .entry(new_chunk)
                .or_default()
                .push(client_id);
        }
        for old_chunk in event.old_view.difference(event.new_view) {
            remove_subscription(server, old_chunk, client_id);
        }
    }

    // Update players that have left
    for (_, (_event, &client_id, &view)) in game
        .ecs
        .query::<(&EntityRemoveEvent, &ClientId, &View)>()
        .iter()
    {
        for chunk in view.iter() {
            remove_subscription(server, chunk, client_id);
        }
    }

    Ok(())
}