1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -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:
Emil Ernerfeldt
2025-12-19 20:55:50 +01:00
committed by GitHub
parent 7fe58bbfd4
commit 8d98763fe1
75 changed files with 89 additions and 111 deletions

View File

@@ -126,7 +126,7 @@ impl CaptureState {
// It would be more efficient to reuse the Buffer, e.g. via some kind of ring buffer, but
// for most screenshot use cases this should be fine. When taking many screenshots (e.g. for a video)
// it might make sense to revisit this and implement a more efficient solution.
#[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 buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("egui_screen_capture_buffer"),
size: (self.padding.padded_bytes_per_row * self.texture.height()) as u64,
@@ -186,7 +186,7 @@ impl CaptureState {
tx: CaptureSender,
viewport_id: ViewportId,
) {
#[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 buffer = Arc::new(buffer);
let buffer_clone = Arc::clone(&buffer);
let buffer_slice = buffer_clone.slice(..);