[niepce] rust: fix clippy warning about Eq



commit 0439c8364fce7b3ff27a3c0630a0747cc7fa2057
Author: Hubert Figuière <hub figuiere net>
Date:   Sat Oct 15 11:17:25 2022 -0400

    rust: fix clippy warning about Eq
    
    - Issue appeared with new Rust compiler

 crates/npc-engine/src/db/filebundle.rs | 4 ++--
 crates/npc-engine/src/db/libfile.rs    | 6 +++---
 crates/npc-engine/src/db/library.rs    | 2 +-
 crates/npc-fwk/src/toolkit/mimetype.rs | 6 +++---
 niepce-main/src/niepce/ui/thumb_nav.rs | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/crates/npc-engine/src/db/filebundle.rs b/crates/npc-engine/src/db/filebundle.rs
index f79a7df5..806fe6cd 100644
--- a/crates/npc-engine/src/db/filebundle.rs
+++ b/crates/npc-engine/src/db/filebundle.rs
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/db/filebundle.rs
  *
- * Copyright (C) 2017-2020 Hubert Figuière
+ * Copyright (C) 2017-2022 Hubert Figuière
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ use npc_fwk::toolkit::mimetype::{IsRaw, MType};
 use npc_fwk::MimeType;
 
 /// Sidecar.
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Eq, PartialEq)]
 pub enum Sidecar {
     Invalid,
     /// Sidecar for Live image (MOV file form iPhone)
diff --git a/crates/npc-engine/src/db/libfile.rs b/crates/npc-engine/src/db/libfile.rs
index 2555d10f..f2aaa18a 100644
--- a/crates/npc-engine/src/db/libfile.rs
+++ b/crates/npc-engine/src/db/libfile.rs
@@ -1,7 +1,7 @@
 /*
  * niepce - eng/db/libfile.rs
  *
- * Copyright (C) 2017-2021 Hubert Figuière
+ * Copyright (C) 2017-2022 Hubert Figuière
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ use super::NiepceProperties as Np;
 use super::NiepcePropertyIdx;
 
 #[repr(i32)]
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
 /// A general type of the LibFile.
 pub enum FileType {
     /// Don't know
@@ -47,7 +47,7 @@ pub enum FileType {
 }
 
 #[repr(i32)]
-#[derive(Debug, Clone, Copy, PartialEq)]
+#[derive(Debug, Clone, Copy, Eq, PartialEq)]
 /// FileStatus indicate the transient status of the file on the storage.
 pub enum FileStatus {
     /// File is OK
diff --git a/crates/npc-engine/src/db/library.rs b/crates/npc-engine/src/db/library.rs
index b0b4412f..ca667419 100644
--- a/crates/npc-engine/src/db/library.rs
+++ b/crates/npc-engine/src/db/library.rs
@@ -43,7 +43,7 @@ use npc_fwk::PropertyValue;
 use npc_fwk::{dbg_assert, dbg_out, err_out};
 
 #[repr(i32)]
-#[derive(PartialEq, Clone, Copy)]
+#[derive(PartialEq, Clone, Copy, Eq)]
 pub enum Managed {
     NO = 0,
     YES = 1,
diff --git a/crates/npc-fwk/src/toolkit/mimetype.rs b/crates/npc-fwk/src/toolkit/mimetype.rs
index 7a98c7af..7a3b19dd 100644
--- a/crates/npc-fwk/src/toolkit/mimetype.rs
+++ b/crates/npc-fwk/src/toolkit/mimetype.rs
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/mimetype.rs
  *
- * Copyright (C) 2017-2020 Hubert Figuière
+ * Copyright (C) 2017-2022 Hubert Figuière
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,13 +22,13 @@ use gio::prelude::*;
 use std::convert::AsRef;
 use std::path::Path;
 
-#[derive(PartialEq, Copy, Clone, Debug)]
+#[derive(PartialEq, Copy, Clone, Debug, Eq)]
 pub enum IsRaw {
     No,
     Yes,
 }
 
-#[derive(PartialEq, Copy, Clone, Debug)]
+#[derive(PartialEq, Copy, Clone, Debug, Eq)]
 pub enum MType {
     None,
     Image(IsRaw),
diff --git a/niepce-main/src/niepce/ui/thumb_nav.rs b/niepce-main/src/niepce/ui/thumb_nav.rs
index b390586c..58813681 100644
--- a/niepce-main/src/niepce/ui/thumb_nav.rs
+++ b/niepce-main/src/niepce/ui/thumb_nav.rs
@@ -34,7 +34,7 @@ const SCROLL_MOVE: f64 = 20.;
 const SCROLL_TIMEOUT: std::time::Duration = std::time::Duration::from_millis(20);
 
 #[repr(i32)]
-#[derive(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, Eq, PartialEq)]
 pub enum ThumbNavMode {
     OneRow,
     OneColumn,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]