Skip to content

Commit 5001146

Browse files
committed
Update check_mutex_persisted_data macro
1 parent f119ed2 commit 5001146

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
@@ -642,21 +642,16 @@ mod tests {
642642
let mut expected_bytes = Vec::new();
643643
loop {
644644
expected_bytes.clear();
645-
match $node.lock() {
646-
Ok(node) => {
647-
match node.write(&mut expected_bytes) {
648-
Ok(_) => {
649-
match std::fs::read($filepath) {
650-
Ok(bytes) => {
651-
if bytes == expected_bytes {
652-
break
653-
} else {
654-
continue
655-
}
656-
},
657-
Err(_) => continue
645+
match $node.lock().unwrap().write(&mut expected_bytes) {
646+
Ok(_) => {
647+
match std::fs::read($filepath) {
648+
Ok(bytes) => {
649+
if bytes == expected_bytes {
650+
break
651+
} else {
652+
continue
658653
}
659-
}
654+
},
660655
Err(_) => continue
661656
}
662657
},

0 commit comments

Comments
 (0)