mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -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:
@@ -7,7 +7,7 @@ use crate::{App, epi, web::web_painter::WebPainter};
|
||||
use super::{NeedRepaint, now_sec, text_agent::TextAgent};
|
||||
|
||||
pub struct AppRunner {
|
||||
#[allow(dead_code, clippy::allow_attributes)]
|
||||
#[allow(clippy::allow_attributes, dead_code)]
|
||||
pub(crate) web_options: crate::WebOptions,
|
||||
pub(crate) frame: epi::Frame,
|
||||
egui_ctx: egui::Context,
|
||||
|
||||
@@ -38,7 +38,7 @@ impl log::Log for WebLogger {
|
||||
}
|
||||
|
||||
fn log(&self, record: &log::Record<'_>) {
|
||||
#![allow(clippy::match_same_arms)]
|
||||
#![expect(clippy::match_same_arms)]
|
||||
|
||||
if !self.enabled(record.metadata()) {
|
||||
return;
|
||||
@@ -110,7 +110,7 @@ mod console {
|
||||
/// * `tokio-1.24.1/src/runtime/runtime.rs`
|
||||
/// * `rerun/src/main.rs`
|
||||
/// * `core/src/ops/function.rs`
|
||||
#[allow(dead_code, clippy::allow_attributes)] // only used on web and in tests
|
||||
#[allow(clippy::allow_attributes, dead_code)] // only used on web and in tests
|
||||
fn shorten_file_path(file_path: &str) -> &str {
|
||||
if let Some(i) = file_path.rfind("/src/") {
|
||||
if let Some(prev_slash) = file_path[..i].rfind('/') {
|
||||
|
||||
@@ -28,7 +28,7 @@ impl WebPainterGlow {
|
||||
let (gl, shader_prefix) =
|
||||
init_glow_context_from_canvas(&canvas, options.webgl_context_option)?;
|
||||
|
||||
#[allow(clippy::arc_with_non_send_sync, clippy::allow_attributes)] // For wasm
|
||||
#[allow(clippy::allow_attributes, clippy::arc_with_non_send_sync)] // For wasm
|
||||
let gl = std::sync::Arc::new(gl);
|
||||
|
||||
let painter = egui_glow::Painter::new(gl, shader_prefix, None, options.dithering)
|
||||
|
||||
Reference in New Issue
Block a user