mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +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::rc::Rc;
|
||||||
use std::sync::atomic::AtomicUsize;
|
use std::sync::atomic::AtomicUsize;
|
||||||
|
|
||||||
use anyhow::{anyhow, bail, Context};
|
use anyhow::{bail, Context};
|
||||||
use mio::unix::SourceFd;
|
use mio::unix::SourceFd;
|
||||||
use mio::{Events, Interest, Poll, Token};
|
use mio::{Events, Interest, Poll, Token};
|
||||||
use wayland_client::backend::WaylandError;
|
use wayland_client::backend::WaylandError;
|
||||||
@ -58,11 +58,7 @@ impl WaylandConnection {
|
|||||||
let mut events = Events::with_capacity(8);
|
let mut events = Events::with_capacity(8);
|
||||||
|
|
||||||
let wl_fd = {
|
let wl_fd = {
|
||||||
let read_guard = self
|
let read_guard = self.event_queue.borrow().prepare_read().unwrap();
|
||||||
.event_queue
|
|
||||||
.borrow()
|
|
||||||
.prepare_read()
|
|
||||||
.ok_or_else(|| anyhow!(""))?;
|
|
||||||
read_guard.connection_fd().as_raw_fd()
|
read_guard.connection_fd().as_raw_fd()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user