public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox v2 10/18] shared-memory: remove unneeded generic parameter
Date: Wed, 26 Jun 2024 14:43:38 +0200	[thread overview]
Message-ID: <20240626124346.531790-10-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20240626124346.531790-1-m.sandoval@proxmox.com>

Fixes the clippy warning:

warning: type parameter `T` goes unused in function definition
  --> proxmox-shared-memory/tests/raw_shared_mutex.rs:80:19
   |
80 | fn create_test_dir<T: Init>(filename: &str) -> Option<PathBuf> {
   |                   ^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
   = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxmox-shared-memory/tests/raw_shared_mutex.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxmox-shared-memory/tests/raw_shared_mutex.rs b/proxmox-shared-memory/tests/raw_shared_mutex.rs
index fff37c0c..7608377e 100644
--- a/proxmox-shared-memory/tests/raw_shared_mutex.rs
+++ b/proxmox-shared-memory/tests/raw_shared_mutex.rs
@@ -77,7 +77,7 @@ impl Init for MultiMutexData {
     }
 }
 
-fn create_test_dir<T: Init>(filename: &str) -> Option<PathBuf> {
+fn create_test_dir(filename: &str) -> Option<PathBuf> {
     let test_dir: String = env!("CARGO_TARGET_TMPDIR").to_string();
 
     let mut path = PathBuf::from(&test_dir);
@@ -100,7 +100,7 @@ fn create_test_dir<T: Init>(filename: &str) -> Option<PathBuf> {
 }
 #[test]
 fn test_shared_memory_mutex() -> Result<(), Error> {
-    let path = match create_test_dir::<SingleMutexData>("data1.shm") {
+    let path = match create_test_dir("data1.shm") {
         None => {
             return Ok(()); // no O_TMPFILE support, can't run test
         }
@@ -138,7 +138,7 @@ fn test_shared_memory_mutex() -> Result<(), Error> {
 
 #[test]
 fn test_shared_memory_multi_mutex() -> Result<(), Error> {
-    let path = match create_test_dir::<SingleMutexData>("data2.shm") {
+    let path = match create_test_dir("data2.shm") {
         None => {
             return Ok(()); // no O_TMPFILE support, can't run test
         }
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel




  parent reply	other threads:[~2024-06-26 12:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 12:43 [pbs-devel] [PATCH proxmox v2 01/18] use unwrap_or_default instead of unwrap_or(Vec::new) Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 02/18] use contains_key instead of .get().is_{some, none}() Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 03/18] remove needless borrows Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 04/18] remove unnecesary pub(self) Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 05/18] time-api: remove redundant field names Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 06/18] acme: remove duplicated attribute Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 07/18] acl: remove null pointer cast Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 08/18] use const blocks in thread_local! calls Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 09/18] remove unneeded returns Maximiliano Sandoval
2024-06-26 12:43 ` Maximiliano Sandoval [this message]
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 11/18] network-api: remove useless uses of format! Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 12/18] http: remove redundant redefinition of binding Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 13/18] http: remove unnecessary cast Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 14/18] acme: elide explicit lifetimes Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 15/18] acme: derive Default for Status Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 16/18] acl: directly return struct rather than a binding Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 17/18] acme-api: remove manual implementation of Option::map Maximiliano Sandoval
2024-06-26 12:43 ` [pbs-devel] [PATCH proxmox v2 18/18] auth-api: do not clone struct implementing Copy Maximiliano Sandoval
2024-06-28  9:44 ` [pbs-devel] applied-series: [PATCH proxmox v2 01/18] use unwrap_or_default instead of unwrap_or(Vec::new) 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=20240626124346.531790-10-m.sandoval@proxmox.com \
    --to=m.sandoval@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal