mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Set MSRV to 1.56.0 and use rust edition 2021 (#998)
This commit is contained in:
@@ -3,7 +3,8 @@ name = "epaint"
|
||||
version = "0.15.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "Minimal 2D graphics library for GUI work"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
homepage = "https://github.com/emilk/egui/tree/master/epaint"
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user