1
1
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:
V 2024-04-09 10:46:24 +02:00 committed by Wez Furlong
parent bbbe9c2cea
commit 004bfd3d9e
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -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()
};