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<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>
This commit is contained in:
Maximiliano Sandoval 2024-06-26 14:43:38 +02:00 committed by Wolfgang Bumiller
parent a87d52dad3
commit d965713565

View File

@ -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 test_dir: String = env!("CARGO_TARGET_TMPDIR").to_string();
let mut path = PathBuf::from(&test_dir); let mut path = PathBuf::from(&test_dir);
@ -100,7 +100,7 @@ fn create_test_dir<T: Init>(filename: &str) -> Option<PathBuf> {
} }
#[test] #[test]
fn test_shared_memory_mutex() -> Result<(), Error> { 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 => { None => {
return Ok(()); // no O_TMPFILE support, can't run test return Ok(()); // no O_TMPFILE support, can't run test
} }
@ -138,7 +138,7 @@ fn test_shared_memory_mutex() -> Result<(), Error> {
#[test] #[test]
fn test_shared_memory_multi_mutex() -> Result<(), Error> { 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 => { None => {
return Ok(()); // no O_TMPFILE support, can't run test return Ok(()); // no O_TMPFILE support, can't run test
} }