Skip to content

Commit

Permalink
print xcb connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Dec 5, 2024
1 parent 8763298 commit a2b20ca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2932,9 +2932,12 @@ mod tests {
// goto for killing xephyr no matter what
let ok = loop {
unsafe {
let Ok((xcon, _)) = Connection::connect(None) else {
eprintln!("rwm: cannot get xcb connection");
break false;
let xcon = match Connection::connect(None) {
Ok((xcon, _)) => xcon,
Err(e) => {
eprintln!("rwm: cannot get xcb connection: {e:?}");
break false;
}
};
XCON = Box::into_raw(Box::new(xcon));
}
Expand Down

0 comments on commit a2b20ca

Please sign in to comment.