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:
Piotr Osiewicz
2025-06-26 20:54:19 +02:00
committed by GitHub
co-authored by Junkui Zhang
parent b079871428
commit 985dcf7523
31 changed files with 112 additions and 303 deletions
+4 -2
View File
@@ -1074,8 +1074,10 @@ fn handle_nc_mouse_up_msg(
}
let last_pressed = state_ptr.state.borrow_mut().nc_button_pressed.take();
if button == MouseButton::Left && last_pressed.is_some() {
let handled = match (wparam.0 as u32, last_pressed.unwrap()) {
if button == MouseButton::Left
&& let Some(last_pressed) = last_pressed
{
let handled = match (wparam.0 as u32, last_pressed) {
(HTMINBUTTON, HTMINBUTTON) => {
unsafe { ShowWindowAsync(handle, SW_MINIMIZE).ok().log_err() };
true
+5 -7
View File
@@ -1250,11 +1250,13 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32
type SetWindowCompositionAttributeType =
unsafe extern "system" fn(HWND, *mut WINDOWCOMPOSITIONATTRIBDATA) -> BOOL;
let module_name = PCSTR::from_raw(c"user32.dll".as_ptr() as *const u8);
let user32 = GetModuleHandleA(module_name);
if user32.is_ok() {
if let Some(user32) = GetModuleHandleA(module_name)
.context("Unable to get user32.dll handle")
.log_err()
{
let func_name = PCSTR::from_raw(c"SetWindowCompositionAttribute".as_ptr() as *const u8);
let set_window_composition_attribute: SetWindowCompositionAttributeType =
std::mem::transmute(GetProcAddress(user32.unwrap(), func_name));
std::mem::transmute(GetProcAddress(user32, func_name));
let mut color = color.unwrap_or_default();
let is_acrylic = state == 4;
if is_acrylic && color.3 == 0 {
@@ -1275,10 +1277,6 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32
cb_data: std::mem::size_of::<AccentPolicy>(),
};
let _ = set_window_composition_attribute(hwnd, &mut data as *mut _ as _);
} else {
let _ = user32
.inspect_err(|e| log::error!("Error getting module: {e}"))
.ok();
}
}
}