From d965713565ccf22a8902029ecd31a732671a7af1 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Wed, 26 Jun 2024 14:43:38 +0200 Subject: [PATCH] shared-memory: remove unneeded generic parameter 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(filename: &str) -> Option { | ^^^^^^^^^ 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 --- 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(filename: &str) -> Option { +fn create_test_dir(filename: &str) -> Option { 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(filename: &str) -> Option { } #[test] fn test_shared_memory_mutex() -> Result<(), Error> { - let path = match create_test_dir::("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::("data2.shm") { + let path = match create_test_dir("data2.shm") { None => { return Ok(()); // no O_TMPFILE support, can't run test }