T42f Misc · Web passes review

in_view names its types in place and the non-macOS branch reads its fields, so builds off macOS stay free of warnings.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-28 05:07:35 -04:00
1 parent c7c4c006a7
commit cbba4ddeec
2 files changed
+10 -5

No files matched your search

+7 -4
View File
@@ -1,6 +1,6 @@
use gpui::{
AnyElement, App, Bounds, ElementId, IntoElement, ParentElement, Pixels, RenderOnce,
SharedString, Styled, Window, div,
AnyElement, App, ElementId, IntoElement, ParentElement, RenderOnce, SharedString, Styled,
Window, div,
};
use crate::{
@@ -19,7 +19,10 @@ pub enum WebSource {
/// Whether a box lies, at least in part, inside what the window shows of its region.
#[cfg(any(target_os = "macos", test))]
pub(crate) fn in_view(bounds: Bounds<Pixels>, shown: Bounds<Pixels>) -> bool {
pub(crate) fn in_view(
bounds: gpui::Bounds<gpui::Pixels>,
shown: gpui::Bounds<gpui::Pixels>,
) -> bool {
bounds.intersects(&shown)
}
@@ -45,7 +48,7 @@ impl RenderOnce for WebView {
return mac::page(self.id, self.source, window, cx);
#[cfg(not(target_os = "macos"))]
{
let _ = window;
let _ = (window, self.id, self.source);
let theme = cx.theme();
div()
.size_full()