forked from proxmox-mirrors/proxmox
shared memory: rustfmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6f8173f67a
commit
0ec1c684ae
@ -211,4 +211,4 @@ pub unsafe fn initialize_subtype<T: Init>(this: &mut T) {
|
||||
pub unsafe fn check_subtype<T: Init>(this: &T) -> Result<(), Error> {
|
||||
let data: &MaybeUninit<T> = std::mem::transmute(this);
|
||||
Init::check_type_magic(data)
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,9 @@ 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") {
|
||||
None => { return Ok(()); }, // no O_TMPFILE support, can't run test
|
||||
None => {
|
||||
return Ok(()); // no O_TMPFILE support, can't run test
|
||||
}
|
||||
Some(path) => path,
|
||||
};
|
||||
|
||||
@ -137,7 +139,9 @@ 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") {
|
||||
None => { return Ok(()); }, // no O_TMPFILE support, can't run test
|
||||
None => {
|
||||
return Ok(()); // no O_TMPFILE support, can't run test
|
||||
}
|
||||
Some(path) => path,
|
||||
};
|
||||
let shared: SharedMemory<MultiMutexData> = SharedMemory::open(&path, CreateOptions::new())?;
|
||||
|
Loading…
Reference in New Issue
Block a user