Skip to content

Commit 89a6fc5

Browse files
committed
Fix/disable ios lint warnings
1 parent b2672f7 commit 89a6fc5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crates/eframe/src/native/epi_integration.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ use winit::event_loop::ActiveEventLoop;
77

88
use raw_window_handle::{HasDisplayHandle as _, HasWindowHandle as _};
99

10-
use egui::{DeferredViewportUiCallback, NumExt as _, ViewportBuilder, ViewportId};
10+
use egui::{DeferredViewportUiCallback, ViewportBuilder, ViewportId};
1111
use egui_winit::{EventResponse, WindowSettings};
1212

1313
use crate::epi;
1414

15+
#[cfg_attr(target_os = "ios", allow(dead_code, unused_variables, unused_mut))]
1516
pub fn viewport_builder(
1617
egui_zoom_factor: f32,
1718
event_loop: &ActiveEventLoop,
@@ -53,8 +54,10 @@ pub fn viewport_builder(
5354

5455
if clamp_size_to_monitor_size {
5556
if let Some(initial_window_size) = viewport_builder.inner_size {
56-
let initial_window_size = initial_window_size
57-
.at_most(largest_monitor_point_size(egui_zoom_factor, event_loop));
57+
let initial_window_size = egui::NumExt::at_most(
58+
initial_window_size,
59+
largest_monitor_point_size(egui_zoom_factor, event_loop),
60+
);
5861
viewport_builder = viewport_builder.with_inner_size(initial_window_size);
5962
}
6063
}
@@ -95,6 +98,7 @@ pub fn apply_window_settings(
9598
}
9699
}
97100

101+
#[cfg(not(target_os = "ios"))]
98102
fn largest_monitor_point_size(egui_zoom_factor: f32, event_loop: &ActiveEventLoop) -> egui::Vec2 {
99103
crate::profile_function!();
100104

0 commit comments

Comments
 (0)