Skip to content

Commit e903274

Browse files
committed
fmt
1 parent 107eaa6 commit e903274

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/integration_test.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,14 @@ fn start_node(data_dir: &str) -> TestNode {
202202
println!("[Node]: {}", line);
203203

204204
// Extract peer ID from the log line
205-
if line.contains("Local peer id:") {
206-
if let Some(id) = line
207-
.split("Local peer id:")
205+
if let (true, Some(id)) = (
206+
line.contains("Local peer id:"),
207+
line.split("Local peer id:")
208208
.nth(1)
209-
.map(|s| s.trim().to_string())
210-
{
211-
let mut lock = handler_clone.lock().unwrap();
212-
*lock = Some(id);
213-
}
209+
.map(|s| s.trim().to_string()),
210+
) {
211+
let mut lock = handler_clone.lock().unwrap();
212+
*lock = Some(id);
214213
}
215214
}
216215
});

0 commit comments

Comments
 (0)