From 3248a38ca176c26b6b24290971e1b23c6e6372b1 Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Tue, 29 Sep 2026 13:53:17 +0800 Subject: [PATCH] Bump gpui-pre to 0.3.7 gpui-pre-wgpu 0.3.7 returns `Option` from `WgpuRenderer::gpu_specs`, so the iOS and Android windows flatten it with `and_then` instead of wrapping it again. The example moves to the gpui-kit revision built on gpui-pre 0.3.7. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 8 ++++---- example/Cargo.toml | 6 +++--- src/android/window.rs | 2 +- src/ios/window.rs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index af6cd6a..0cdadbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ futures = "0.3" raw-window-handle = "0.6" # ── GPUI core crate (provides Platform trait, event types, geometry, etc.) ─── -gpui = { package = "gpui-pre", version = "=0.3.6", default-features = false } +gpui = { package = "gpui-pre", version = "=0.3.7", default-features = false } # ── iOS ────────────────────────────────────────────────────────────────────── @@ -80,7 +80,7 @@ uuid = { version = "1", features = ["v4", "v5"] } block2 = "0.6" # wgpu renderer (Metal backend on iOS/Android) -gpui_wgpu = { package = "gpui-pre-wgpu", version = "=0.3.6", features = ["font-kit"] } +gpui_wgpu = { package = "gpui-pre-wgpu", version = "=0.3.7", features = ["font-kit"] } wgpu = "29.0.4" # Text / font stack @@ -111,7 +111,7 @@ android_logger = "0.15" # wgpu renderer (Vulkan backend on Android) # Android uses Cosmic Text and system fonts; font-kit pulls in desktop Fontconfig. -gpui_wgpu = { package = "gpui-pre-wgpu", version = "=0.3.6" } +gpui_wgpu = { package = "gpui-pre-wgpu", version = "=0.3.7" } # rustc-hash is required by the PlatformKeyboardMapper trait signature rustc-hash = "2" @@ -120,7 +120,7 @@ uuid = { version = "1", features = ["v5"] } # ── dev ────────────────────────────────────────────────────────────────────── [dev-dependencies] -gpui = { package = "gpui-pre", version = "=0.3.6", default-features = false, features = ["test-support"] } +gpui = { package = "gpui-pre", version = "=0.3.7", default-features = false, features = ["test-support"] } # ── profiles ───────────────────────────────────────────────────────────────── diff --git a/example/Cargo.toml b/example/Cargo.toml index 3d9e61c..e2f3de2 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -16,10 +16,10 @@ path = "src/main.rs" [dependencies] # Pin the mobile facade support without requiring a published crate. -gpui-kit = { git = "https://github.com/longbridge/gpui-kit", rev = "13c716b687b47f96a677aaf46c8fa341fa7208da", default-features = false, features = ["component"] } +gpui-kit = { git = "https://github.com/longbridge/gpui-kit", rev = "2ec5696c2e975ddd2b8380d12ec00631bd159128", default-features = false, features = ["component"] } gpui-mobile = { package = "gpui-pre-mobile", path = "..", version = "0.1.0" } -gpui = { package = "gpui-pre", version = "=0.3.6", default-features = false } -reqwest_client = { package = "gpui-pre-reqwest-client", version = "=0.3.6" } +gpui = { package = "gpui-pre", version = "=0.3.7", default-features = false } +reqwest_client = { package = "gpui-pre-reqwest-client", version = "=0.3.7" } reqwest = { package = "gpui-pre-reqwest", version = "0.12.15", default-features = false, features = ["rustls-tls"] } log = "0.4" diff --git a/src/android/window.rs b/src/android/window.rs index efd697a..765dc1d 100644 --- a/src/android/window.rs +++ b/src/android/window.rs @@ -1032,7 +1032,7 @@ impl AndroidWindow { /// Returns GPU specs from the renderer, if available. pub fn gpu_specs(&self) -> Option { let state = self.state.lock(); - state.renderer.as_ref().map(|r| r.gpu_specs()) + state.renderer.as_ref().and_then(|r| r.gpu_specs()) } /// Whether the window is currently active / visible. diff --git a/src/ios/window.rs b/src/ios/window.rs index 709d659..2d9c709 100644 --- a/src/ios/window.rs +++ b/src/ios/window.rs @@ -1593,7 +1593,7 @@ impl PlatformWindow for IosWindow { fn gpu_specs(&self) -> Option { let guard = self.renderer.lock(); - guard.as_ref().map(|r| r.gpu_specs()) + guard.as_ref().and_then(|r| r.gpu_specs()) } fn update_ime_position(&self, _bounds: Bounds) {