Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
coderedart committed Dec 2, 2023
1 parent 5e67825 commit a070b71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/egui_render_wgpu/src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl EguiPainter {
let mut is_this_font_texure = false;
// no need for mipmaps if we are dealing with font texture
let mip_level_count = match tex_id {
TextureId::Managed(tid) if tid == 0 => {
TextureId::Managed(0) => {
is_this_font_texure = true;
1
}
Expand Down
4 changes: 2 additions & 2 deletions crates/egui_render_wgpu/src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ impl Drop for SurfaceManager {
}
}
impl SurfaceManager {
#[allow(clippy::too_many_arguments)]
pub fn new(
window: Option<impl HasRawWindowHandle + HasRawDisplayHandle>,
transparent: Option<bool>,
Expand Down Expand Up @@ -123,8 +124,7 @@ impl SurfaceManager {

if transparent.unwrap_or_default() {
use CompositeAlphaMode::*;
let alpha_modes: Vec<CompositeAlphaMode> =
capabilities.alpha_modes.iter().copied().collect();
let alpha_modes: Vec<CompositeAlphaMode> = capabilities.alpha_modes.to_vec();
tracing::info!(?alpha_modes, "supported alpha modes");
{
self.surface_config.alpha_mode = if alpha_modes.contains(&Inherit) {
Expand Down

0 comments on commit a070b71

Please sign in to comment.