Skip to content

Commit 4108db0

Browse files
authored
Fix two minor clippy lints (#315)
* Fix clippy::redundant_static_lifetimes * Fix clippy::filter_next
1 parent 83c1d08 commit 4108db0

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/platform/generic/egl/context.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,11 @@ impl ContextDescriptor {
355355
}
356356

357357
// Sanitize configs.
358-
let egl_config = configs
359-
.into_iter()
360-
.filter(|&egl_config| {
361-
required_config_attributes
362-
.chunks(2)
363-
.all(|pair| get_config_attr(egl_display, egl_config, pair[0]) == pair[1])
364-
})
365-
.next();
358+
let egl_config = configs.into_iter().find(|&egl_config| {
359+
required_config_attributes
360+
.chunks(2)
361+
.all(|pair| get_config_attr(egl_display, egl_config, pair[0]) == pair[1])
362+
});
366363
let egl_config = match egl_config {
367364
None => return Err(Error::NoPixelFormatFound),
368365
Some(egl_config) => egl_config,

src/platform/unix/generic/device.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use crate::{Error, GLApi};
88
use std::env;
99
use std::sync::Arc;
1010

11-
static MESA_SOFTWARE_RENDERING_ENV_VAR: &'static str = "LIBGL_ALWAYS_SOFTWARE";
12-
static MESA_DRI_PRIME_ENV_VAR: &'static str = "DRI_PRIME";
11+
static MESA_SOFTWARE_RENDERING_ENV_VAR: &str = "LIBGL_ALWAYS_SOFTWARE";
12+
static MESA_DRI_PRIME_ENV_VAR: &str = "DRI_PRIME";
1313

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

0 commit comments

Comments
 (0)