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: windows.rs
    path of file: ./repos/zee/zee/src/editor
    
    the code of the file until where you have to start completion: use std::{
    fmt::Display,
    ops::{Add, Rem},
};
use zi::{Container, FlexDirection, Item, Layout};

pub(super) enum CycleFocus {
    Next,
    Previous,
}

pub(super) struct Window<IdT> {
    pub id: IdT,
    pub focused: bool,
    pub index: WindowIndex,
}

pub(super) struct WindowTree<IdT> {
    nodes: Vec<Node<IdT>>,
    focused_index: WindowIndex,
    num_windows: WindowIndex,
}

impl<IdT: Clone + Copy + Display> WindowTree<IdT> {
    pub fn new() -> Self {
        Self {
            nodes: Vec::new(),
            focused_index: WindowIndex(0),
            num_windows: WindowIndex(0),
        }
    }

    pub fn clear(&mut self) {
        self.nodes.clear();
        self.focused_index = WindowIndex(0);
        self.num_windows = WindowIndex(0);
    }

    
    pub fn delete_focused(&mut self) {
        let focused = self.find_focused_window();
        self.nodes.remove(focused.node_index);
        self.num_windows = self.num_windows.saturating_decrement();
        self.focused_index = self.focused_index.saturating_decrement();

        let mut node_index = 0;
        while node_index < self.nodes.len() {
            match self.nodes[node_index..] {
                [Node::ContainerStart(_), window @ Node::Window(_), Node::ContainerEnd, ..] => {
                    self.nodes
                        .splice(node_index..node_index + 3, std::iter::once(window));
                }
                [Node::ContainerStart(_), Node::ContainerEnd, ..] => {
                    self.nodes.drain(node_index..node_index + 2);
                }
                _ => {
                    node_index += 1;
                }
            };
        }
    }