mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -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:
@@ -1,4 +1,4 @@
|
||||
#![allow(clippy::undocumented_unsafe_blocks)]
|
||||
#![expect(clippy::undocumented_unsafe_blocks)]
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Demo app for egui
|
||||
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
#![allow(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
#![allow(clippy::never_loop)] // False positive
|
||||
#![expect(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
#![allow(clippy::allow_attributes, clippy::never_loop)]
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; // Much faster allocator, can give 20% speedups: https://github.com/emilk/egui/pull/7029
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![allow(clippy::mem_forget)] // False positives from #[wasm_bindgen] macro
|
||||
|
||||
use eframe::wasm_bindgen::{self, prelude::*};
|
||||
|
||||
use crate::WrapApp;
|
||||
@@ -14,7 +12,7 @@ pub struct WebHandle {
|
||||
#[wasm_bindgen]
|
||||
impl WebHandle {
|
||||
/// Installs a panic hook, then returns.
|
||||
#[allow(clippy::new_without_default, clippy::allow_attributes)]
|
||||
#[allow(clippy::allow_attributes, clippy::new_without_default)]
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new() -> Self {
|
||||
// Redirect [`log`] message to `console.log` and friends:
|
||||
|
||||
@@ -183,7 +183,7 @@ impl WrapApp {
|
||||
cc.egui_ctx
|
||||
.add_plugin(crate::accessibility_inspector::AccessibilityInspectorPlugin::default());
|
||||
|
||||
#[allow(unused_mut, clippy::allow_attributes)]
|
||||
#[allow(clippy::allow_attributes, unused_mut)]
|
||||
let mut slf = Self {
|
||||
state: State::default(),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user