fn retain_connection_views(&self, connections: &[controller::graph::Connection]) {
        let to_remove = {
            let borrowed = self.connection_views.borrow();
            let filtered = borrowed.iter().filter(|(con, _)| !connections.contains(con));
            filtered.map(|(_, edge_id)| *edge_id).collect_vec()
        };
        for edge_id in to_remove {
            self.view.graph().frp.input.remove_edge.emit(&edge_id);
            self.connection_views.borrow_mut().remove_by_right(&edge_id);
        }
    }
/// Retain only given connections in displayed graph.
Retain only given connections in displayed graph.
Retain only given connections in displayed graph .
fn retain_connection_views(&self, connections: &[controller::graph::Connection]) {
        let to_remove = {
            let borrowed = self.connection_views.borrow();
            let filtered = borrowed.iter().filter(|(con, _)| !connections.contains(con));
            filtered.map(|(_, edge_id)| *edge_id).collect_vec()
        };
        for edge_id in to_remove {
            self.view.graph().frp.input.remove_edge.emit(&edge_id);
            self.connection_views.borrow_mut().remove_by_right(&edge_id);
        }
    }
fn retain_connection_views ( & self , connections : & [ controller :: graph :: Connection ] ) { let to_remove = { let borrowed = self . connection_views . borrow ( ) ; let filtered = borrowed . iter ( ) . filter ( | ( con , _ ) | ! connections . contains ( con ) ) ; filtered . map ( | ( _ , edge_id ) | * edge_id ) . collect_vec ( ) } ; for edge_id in to_remove { self . view . graph ( ) . frp . input . remove_edge . emit ( & edge_id ) ; self . connection_views . borrow_mut ( ) . remove_by_right ( & edge_id ) ; } }
Retain only given connections in displayed graph.
Retain only given connections in displayed graph .
&self
connections
&[controller::graph::Connection]
&self
connections
&[controller::graph::Connection]