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

Set MSRV to 1.56.0 and use rust edition 2021 (#998)

This commit is contained in:
Emil Ernerfeldt
2021-12-25 19:32:25 +01:00
committed by GitHub
parent ee00214511
commit c60d17b91b
18 changed files with 36 additions and 29 deletions

View File

@@ -64,7 +64,6 @@ impl Mesh {
/// Are all indices within the bounds of the contained vertices?
pub fn is_valid(&self) -> bool {
use std::convert::TryFrom;
if let Ok(n) = u32::try_from(self.vertices.len()) {
self.indices.iter().all(|&i| i < n)
} else {
@@ -223,7 +222,6 @@ impl Mesh {
MAX_SIZE
);
use std::convert::TryFrom;
let mesh = Mesh16 {
indices: self.indices[span_start..index_cursor]
.iter()
@@ -267,7 +265,6 @@ pub struct Mesh16 {
impl Mesh16 {
/// Are all indices within the bounds of the contained vertices?
pub fn is_valid(&self) -> bool {
use std::convert::TryFrom;
if let Ok(n) = u16::try_from(self.vertices.len()) {
self.indices.iter().all(|&i| i < n)
} else {