mirror of
https://git.proxmox.com/git/proxmox
synced 2025-06-13 22:01:01 +00:00
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:
parent
a87d52dad3
commit
d965713565
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user