chore: Bump Rust version to 1.88 (#33439)
Goodies in this version: - if-let chains 🎉 - Better compiler perf for Zed (https://github.com/rust-lang/rust/pull/138522) For more, see: https://releases.rs/docs/1.88.0/ Release Notes: - N/A --------- Co-authored-by: Junkui Zhang <364772080@qq.com>
This commit is contained in:
co-authored by
Junkui Zhang
parent
b079871428
commit
985dcf7523
@@ -252,11 +252,11 @@ impl Drop for WaylandWindow {
|
||||
}
|
||||
|
||||
impl WaylandWindow {
|
||||
fn borrow(&self) -> Ref<WaylandWindowState> {
|
||||
fn borrow(&self) -> Ref<'_, WaylandWindowState> {
|
||||
self.0.state.borrow()
|
||||
}
|
||||
|
||||
fn borrow_mut(&self) -> RefMut<WaylandWindowState> {
|
||||
fn borrow_mut(&self) -> RefMut<'_, WaylandWindowState> {
|
||||
self.0.state.borrow_mut()
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ pub(crate) struct X11WindowStatePtr {
|
||||
}
|
||||
|
||||
impl rwh::HasWindowHandle for RawWindow {
|
||||
fn window_handle(&self) -> Result<rwh::WindowHandle, rwh::HandleError> {
|
||||
fn window_handle(&self) -> Result<rwh::WindowHandle<'_>, rwh::HandleError> {
|
||||
let Some(non_zero) = NonZeroU32::new(self.window_id) else {
|
||||
log::error!("RawWindow.window_id zero when getting window handle.");
|
||||
return Err(rwh::HandleError::Unavailable);
|
||||
@@ -299,7 +299,7 @@ impl rwh::HasWindowHandle for RawWindow {
|
||||
}
|
||||
}
|
||||
impl rwh::HasDisplayHandle for RawWindow {
|
||||
fn display_handle(&self) -> Result<rwh::DisplayHandle, rwh::HandleError> {
|
||||
fn display_handle(&self) -> Result<rwh::DisplayHandle<'_>, rwh::HandleError> {
|
||||
let Some(non_zero) = NonNull::new(self.connection) else {
|
||||
log::error!("Null RawWindow.connection when getting display handle.");
|
||||
return Err(rwh::HandleError::Unavailable);
|
||||
@@ -310,12 +310,12 @@ impl rwh::HasDisplayHandle for RawWindow {
|
||||
}
|
||||
|
||||
impl rwh::HasWindowHandle for X11Window {
|
||||
fn window_handle(&self) -> Result<rwh::WindowHandle, rwh::HandleError> {
|
||||
fn window_handle(&self) -> Result<rwh::WindowHandle<'_>, rwh::HandleError> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
impl rwh::HasDisplayHandle for X11Window {
|
||||
fn display_handle(&self) -> Result<rwh::DisplayHandle, rwh::HandleError> {
|
||||
fn display_handle(&self) -> Result<rwh::DisplayHandle<'_>, rwh::HandleError> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
@@ -679,26 +679,6 @@ impl X11WindowState {
|
||||
}
|
||||
}
|
||||
|
||||
/// A handle to an X11 window which destroys it on Drop.
|
||||
pub struct X11WindowHandle {
|
||||
id: xproto::Window,
|
||||
xcb: Rc<XCBConnection>,
|
||||
}
|
||||
|
||||
impl Drop for X11WindowHandle {
|
||||
fn drop(&mut self) {
|
||||
maybe!({
|
||||
check_reply(
|
||||
|| "X11 DestroyWindow failed while dropping X11WindowHandle.",
|
||||
self.xcb.destroy_window(self.id),
|
||||
)?;
|
||||
xcb_flush(&self.xcb);
|
||||
anyhow::Ok(())
|
||||
})
|
||||
.log_err();
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct X11Window(pub X11WindowStatePtr);
|
||||
|
||||
impl Drop for X11Window {
|
||||
|
||||
Reference in New Issue
Block a user