1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Fix some clippy warning from Rust 1.78.0 (#4444)

This commit is contained in:
Emil Ernerfeldt
2024-05-02 17:04:25 +02:00
committed by GitHub
parent c9b24d5a5c
commit ded8dbd45b
21 changed files with 37 additions and 72 deletions

View File

@@ -162,7 +162,7 @@ pub struct Renderer {
texture_bind_group_layout: wgpu::BindGroupLayout,
/// Map of egui texture IDs to textures and their associated bindgroups (texture view +
/// sampler). The texture may be None if the TextureId is just a handle to a user-provided
/// sampler). The texture may be None if the `TextureId` is just a handle to a user-provided
/// sampler.
textures: HashMap<epaint::TextureId, (Option<wgpu::Texture>, wgpu::BindGroup)>,
next_user_texture_id: u64,

View File

@@ -209,7 +209,7 @@ impl Painter {
if let Some(window) = window {
let size = window.inner_size();
if self.surfaces.get(&viewport_id).is_none() {
if !self.surfaces.contains_key(&viewport_id) {
let surface = self.instance.create_surface(window)?;
self.add_surface(surface, viewport_id, size).await?;
}
@@ -235,7 +235,7 @@ impl Painter {
if let Some(window) = window {
let size = window.inner_size();
if self.surfaces.get(&viewport_id).is_none() {
if !self.surfaces.contains_key(&viewport_id) {
let surface = unsafe {
self.instance
.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window)?)?