Skip to content

Commit

Permalink
Fix two minor clippy lints (#315)
Browse files Browse the repository at this point in the history
* Fix clippy::redundant_static_lifetimes

* Fix clippy::filter_next
  • Loading branch information
jschwe authored Sep 5, 2024
1 parent 83c1d08 commit 4108db0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions src/platform/generic/egl/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,11 @@ impl ContextDescriptor {
}

// Sanitize configs.
let egl_config = configs
.into_iter()
.filter(|&egl_config| {
required_config_attributes
.chunks(2)
.all(|pair| get_config_attr(egl_display, egl_config, pair[0]) == pair[1])
})
.next();
let egl_config = configs.into_iter().find(|&egl_config| {
required_config_attributes
.chunks(2)
.all(|pair| get_config_attr(egl_display, egl_config, pair[0]) == pair[1])
});
let egl_config = match egl_config {
None => return Err(Error::NoPixelFormatFound),
Some(egl_config) => egl_config,
Expand Down
4 changes: 2 additions & 2 deletions src/platform/unix/generic/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{Error, GLApi};
use std::env;
use std::sync::Arc;

static MESA_SOFTWARE_RENDERING_ENV_VAR: &'static str = "LIBGL_ALWAYS_SOFTWARE";
static MESA_DRI_PRIME_ENV_VAR: &'static str = "DRI_PRIME";
static MESA_SOFTWARE_RENDERING_ENV_VAR: &str = "LIBGL_ALWAYS_SOFTWARE";
static MESA_DRI_PRIME_ENV_VAR: &str = "DRI_PRIME";

/// Represents a hardware display adapter that can be used for rendering (including the CPU).
///
Expand Down

0 comments on commit 4108db0

Please sign in to comment.