all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/8] clippy: fix Mutex with unused value
Date: Wed, 20 Jan 2021 17:23:49 +0100	[thread overview]
Message-ID: <20210120162355.2750802-3-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20210120162355.2750802-1-f.gruenbichler@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 src/api2/node/dns.rs      | 2 +-
 src/backup/chunk_store.rs | 4 ++--
 src/backup/datastore.rs   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/api2/node/dns.rs b/src/api2/node/dns.rs
index 9a22bf60..e3dd614d 100644
--- a/src/api2/node/dns.rs
+++ b/src/api2/node/dns.rs
@@ -125,7 +125,7 @@ pub fn update_dns(
 ) -> Result<Value, Error> {
 
     lazy_static! {
-        static ref MUTEX: Arc<Mutex<usize>> = Arc::new(Mutex::new(0));
+        static ref MUTEX: Arc<Mutex<()>> = Arc::new(Mutex::new(()));
     }
 
     let _guard = MUTEX.lock();
diff --git a/src/backup/chunk_store.rs b/src/backup/chunk_store.rs
index f782169d..cc4a9435 100644
--- a/src/backup/chunk_store.rs
+++ b/src/backup/chunk_store.rs
@@ -18,7 +18,7 @@ pub struct ChunkStore {
     name: String, // used for error reporting
     pub (crate) base: PathBuf,
     chunk_dir: PathBuf,
-    mutex: Mutex<bool>,
+    mutex: Mutex<()>,
     locker: Arc<Mutex<tools::ProcessLocker>>,
 }
 
@@ -143,7 +143,7 @@ impl ChunkStore {
             base,
             chunk_dir,
             locker,
-            mutex: Mutex::new(false)
+            mutex: Mutex::new(())
         })
     }
 
diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
index b1099460..34865380 100644
--- a/src/backup/datastore.rs
+++ b/src/backup/datastore.rs
@@ -37,7 +37,7 @@ lazy_static! {
 /// management interface for backup.
 pub struct DataStore {
     chunk_store: Arc<ChunkStore>,
-    gc_mutex: Mutex<bool>,
+    gc_mutex: Mutex<()>,
     last_gc_status: Mutex<GarbageCollectionStatus>,
     verify_new: bool,
 }
@@ -89,7 +89,7 @@ impl DataStore {
 
         Ok(Self {
             chunk_store: Arc::new(chunk_store),
-            gc_mutex: Mutex::new(false),
+            gc_mutex: Mutex::new(()),
             last_gc_status: Mutex::new(gc_status),
             verify_new: config.verify_new.unwrap_or(false),
         })
-- 
2.20.1





  parent reply	other threads:[~2021-01-20 16:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 16:23 [pbs-devel] [PATCH proxmox-backup 0/8] clippy fixes Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 1/8] clippy: add is_empty() when len() is implemented Fabian Grünbichler
2021-01-20 16:23 ` Fabian Grünbichler [this message]
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 3/8] clippy: rewrite comparison chains Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 4/8] clippy: rewrite ifs with identical return values Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 5/8] apt: let api handle optional bool with default Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 6/8] rework GC traversal error handling Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 7/8] http-client: fix typoed ticket cache condition Fabian Grünbichler
2021-01-20 16:23 ` [pbs-devel] [PATCH proxmox-backup 8/8] http-client: further clippy cleanups Fabian Grünbichler
2021-01-25 10:52 ` [pbs-devel] applied series: [PATCH proxmox-backup 0/8] clippy fixes Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210120162355.2750802-3-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal