fix clippy warnings

This commit is contained in:
Guillaume Desmottes
2021-02-03 16:18:59 +01:00
committed by Tom A. Wagner
parent 99b2ef274a
commit 5784275d32
4 changed files with 24 additions and 22 deletions

View File

@@ -273,3 +273,9 @@ impl GraphView {
self.queue_draw();
}
}
impl Default for GraphView {
fn default() -> Self {
Self::new()
}
}

View File

@@ -135,11 +135,7 @@ impl Node {
pub fn get_port(&self, id: u32) -> Option<Rc<super::port::Port>> {
let private = imp::Node::from_instance(self);
private
.ports
.borrow_mut()
.get(&id)
.map(|port_rc| port_rc.clone())
private.ports.borrow_mut().get(&id).cloned()
}
pub fn remove_port(&self, id: u32) {