shared memory: rustfmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-10 12:37:38 +02:00
parent 6f8173f67a
commit 0ec1c684ae
2 changed files with 7 additions and 3 deletions

View File

@ -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)
}
}

View File

@ -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())?;