mirror of
https://github.com/wez/wezterm.git
synced 2024-08-17 02:00:25 +03:00
Unwrap wayland fd acquisition rather than erroring without a message
This commit is contained in:
parent
bbbe9c2cea
commit
004bfd3d9e
@ -4,7 +4,7 @@ use std::os::fd::AsRawFd;
|
||||
use std::rc::Rc;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
|
||||
use anyhow::{anyhow, bail, Context};
|
||||
use anyhow::{bail, Context};
|
||||
use mio::unix::SourceFd;
|
||||
use mio::{Events, Interest, Poll, Token};
|
||||
use wayland_client::backend::WaylandError;
|
||||
@ -58,11 +58,7 @@ impl WaylandConnection {
|
||||
let mut events = Events::with_capacity(8);
|
||||
|
||||
let wl_fd = {
|
||||
let read_guard = self
|
||||
.event_queue
|
||||
.borrow()
|
||||
.prepare_read()
|
||||
.ok_or_else(|| anyhow!(""))?;
|
||||
let read_guard = self.event_queue.borrow().prepare_read().unwrap();
|
||||
read_guard.connection_fd().as_raw_fd()
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user