mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Replace #[allow attributes with expect (#7796)
We do have `clippy::allow_attributes` turned on, but it doesn't seem to work properly
This commit is contained in:
@@ -47,7 +47,7 @@ enum AppIconStatus {
|
||||
NotSetTryAgain,
|
||||
|
||||
/// We successfully set the icon and it should be visible now.
|
||||
#[allow(dead_code, clippy::allow_attributes)] // Not used on Linux
|
||||
#[allow(clippy::allow_attributes, dead_code)] // Not used on Linux
|
||||
Set,
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ fn set_title_and_icon(_title: &str, _icon_data: Option<&IconData>) -> AppIconSta
|
||||
#[cfg(target_os = "macos")]
|
||||
return set_title_and_icon_mac(_title, _icon_data);
|
||||
|
||||
#[allow(unreachable_code, clippy::allow_attributes)]
|
||||
#[allow(clippy::allow_attributes, unreachable_code)]
|
||||
AppIconStatus::NotSetIgnored
|
||||
}
|
||||
|
||||
|
||||
@@ -349,8 +349,6 @@ pub fn run_glow(
|
||||
mut native_options: epi::NativeOptions,
|
||||
app_creator: epi::AppCreator<'_>,
|
||||
) -> Result {
|
||||
#![allow(clippy::needless_return_with_question_mark)] // False positive
|
||||
|
||||
use super::glow_integration::GlowWinitApp;
|
||||
|
||||
#[cfg(not(target_os = "ios"))]
|
||||
@@ -387,8 +385,6 @@ pub fn run_wgpu(
|
||||
mut native_options: epi::NativeOptions,
|
||||
app_creator: epi::AppCreator<'_>,
|
||||
) -> Result {
|
||||
#![allow(clippy::needless_return_with_question_mark)] // False positive
|
||||
|
||||
use super::wgpu_integration::WgpuWinitApp;
|
||||
|
||||
#[cfg(not(target_os = "ios"))]
|
||||
|
||||
@@ -256,7 +256,7 @@ impl<'app> WgpuWinitApp<'app> {
|
||||
});
|
||||
}
|
||||
|
||||
#[allow(unused_mut, clippy::allow_attributes)] // used for accesskit
|
||||
#[allow(clippy::allow_attributes, unused_mut)] // used for accesskit
|
||||
let mut egui_winit = egui_winit::State::new(
|
||||
egui_ctx.clone(),
|
||||
ViewportId::ROOT,
|
||||
|
||||
Reference in New Issue
Block a user