From 6b657891c6fde0e0c9082f0fcbd0760a3c359310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 6 Sep 2022 12:37:26 +0200 Subject: [PATCH] graphmanager: fix some lint issues with rust 1.63 Fix format and missing derive --- src/graphmanager/node.rs | 5 +++-- src/graphmanager/port.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/graphmanager/node.rs b/src/graphmanager/node.rs index 6bb247d..f1fbc13 100644 --- a/src/graphmanager/node.rs +++ b/src/graphmanager/node.rs @@ -18,8 +18,9 @@ use std::cell::{Cell, Ref, RefCell}; use std::collections::HashMap; use std::fmt; +use std::fmt::Write as _; -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum NodeType { Source, Transform, @@ -292,7 +293,7 @@ impl Node { let mut description = String::from(""); for (name, value) in self_.properties.borrow().iter() { if !self.hidden_property(name) { - description.push_str(&format!("{}:{}", name, value)); + let _ = write!(description, "{}:{}", name, value); description.push('\n'); } } diff --git a/src/graphmanager/port.rs b/src/graphmanager/port.rs index d3f2ae5..5ce7047 100644 --- a/src/graphmanager/port.rs +++ b/src/graphmanager/port.rs @@ -20,7 +20,7 @@ use std::fmt; use super::{PropertyExt, SelectionExt}; -#[derive(Debug, Clone, PartialOrd, PartialEq, Copy)] +#[derive(Debug, Clone, PartialOrd, PartialEq, Eq, Copy)] pub enum PortDirection { Input, Output, @@ -46,7 +46,7 @@ impl PortDirection { } /// Port's presence -#[derive(Debug, Clone, PartialEq, PartialOrd, Copy)] +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Copy)] pub enum PortPresence { /// Can not be removed from his parent independantly Always,