Skip to content

Commit b6f523b

Browse files
committed
Update check_mutex_persisted_data macro
1 parent ec9d048 commit b6f523b

File tree

1 file changed

+9
-14
lines changed
  • lightning-background-processor/src

1 file changed

+9
-14
lines changed

lightning-background-processor/src/lib.rs

+9-14
Original file line numberDiff line numberDiff line change
@@ -615,21 +615,16 @@ mod tests {
615615
let mut expected_bytes = Vec::new();
616616
loop {
617617
expected_bytes.clear();
618-
match $node.lock() {
619-
Ok(node) => {
620-
match node.write(&mut expected_bytes) {
621-
Ok(_) => {
622-
match std::fs::read($filepath) {
623-
Ok(bytes) => {
624-
if bytes == expected_bytes {
625-
break
626-
} else {
627-
continue
628-
}
629-
},
630-
Err(_) => continue
618+
match $node.lock().unwrap().write(&mut expected_bytes) {
619+
Ok(_) => {
620+
match std::fs::read($filepath) {
621+
Ok(bytes) => {
622+
if bytes == expected_bytes {
623+
break
624+
} else {
625+
continue
631626
}
632-
}
627+
},
633628
Err(_) => continue
634629
}
635630
},

0 commit comments

Comments
 (0)