Skip to content

Commit a2b20ca

Browse files
committed
print xcb connection error
1 parent 8763298 commit a2b20ca

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -2932,9 +2932,12 @@ mod tests {
29322932
// goto for killing xephyr no matter what
29332933
let ok = loop {
29342934
unsafe {
2935-
let Ok((xcon, _)) = Connection::connect(None) else {
2936-
eprintln!("rwm: cannot get xcb connection");
2937-
break false;
2935+
let xcon = match Connection::connect(None) {
2936+
Ok((xcon, _)) => xcon,
2937+
Err(e) => {
2938+
eprintln!("rwm: cannot get xcb connection: {e:?}");
2939+
break false;
2940+
}
29382941
};
29392942
XCON = Box::into_raw(Box::new(xcon));
29402943
}

0 commit comments

Comments
 (0)