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

misc clippy fixes from 1.60.0

This commit is contained in:
Emil Ernerfeldt
2022-04-07 17:03:19 +02:00
parent dffab1c737
commit 7cd285ecbc
12 changed files with 30 additions and 45 deletions

View File

@@ -29,7 +29,9 @@ impl ShaderVersion {
pub(crate) fn parse(glsl_ver: &str) -> Self {
let start = glsl_ver.find(|c| char::is_ascii_digit(&c)).unwrap();
let es = glsl_ver[..start].contains(" ES ");
let ver = glsl_ver[start..].splitn(2, ' ').next().unwrap();
let ver = glsl_ver[start..]
.split_once(' ')
.map_or(&glsl_ver[start..], |x| x.0);
let [maj, min]: [u8; 2] = ver
.splitn(3, '.')
.take(2)