Set MSRV to 1.56.0 and use rust edition 2021 (#998)
This commit is contained in:
parent
ee00214511
commit
c60d17b91b
18 changed files with 36 additions and 29 deletions
18
.github/workflows/rust.yml
vendored
18
.github/workflows/rust.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -32,7 +32,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup target add wasm32-unknown-unknown
|
- run: rustup target add wasm32-unknown-unknown
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -64,7 +64,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup target add wasm32-unknown-unknown
|
- run: rustup target add wasm32-unknown-unknown
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -80,7 +80,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update && sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd
|
- run: sudo apt-get update && sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -96,7 +96,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
@ -112,7 +112,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
- run: sudo apt-get update && sudo apt-get install libspeechd-dev libgtk-3-dev # libgtk-3-dev is used by rfd
|
- run: sudo apt-get update && sudo apt-get install libspeechd-dev libgtk-3-dev # libgtk-3-dev is used by rfd
|
||||||
|
@ -129,7 +129,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
||||||
- run: cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui-winit -p egui_glium -p egui_glow --lib --no-deps --all-features
|
- run: cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui-winit -p egui_glium -p egui_glow --lib --no-deps --all-features
|
||||||
|
@ -142,7 +142,7 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.54.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
|
||||||
- run: rustup target add wasm32-unknown-unknown
|
- run: rustup target add wasm32-unknown-unknown
|
||||||
|
|
|
@ -21,6 +21,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
|
||||||
* Add `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)).
|
* Add `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)).
|
||||||
|
|
||||||
### Changed 🔧
|
### Changed 🔧
|
||||||
|
* MSRV (Minimum Supported Rust Version) is now `1.56.0`.
|
||||||
* `ui.add(Button::new("…").text_color(…))` is now `ui.button(RichText::new("…").color(…))` (same for `Label` )([#855](https://github.com/emilk/egui/pull/855)).
|
* `ui.add(Button::new("…").text_color(…))` is now `ui.button(RichText::new("…").color(…))` (same for `Label` )([#855](https://github.com/emilk/egui/pull/855)).
|
||||||
* Plots now provide a `show` method that has to be used to add items to and show the plot ([#766](https://github.com/emilk/egui/pull/766)).
|
* Plots now provide a `show` method that has to be used to add items to and show the plot ([#766](https://github.com/emilk/egui/pull/766)).
|
||||||
* Replace `CtxRef::begin_frame` and `end_frame` with `CtxRef::run` ([#872](https://github.com/emilk/egui/pull/872)).
|
* Replace `CtxRef::begin_frame` and `end_frame` with `CtxRef::run` ([#872](https://github.com/emilk/egui/pull/872)).
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "eframe"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "egui framework - write GUI apps that compiles to web and/or natively"
|
description = "egui framework - write GUI apps that compiles to web and/or natively"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/eframe"
|
homepage = "https://github.com/emilk/egui/tree/master/eframe"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui-winit"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for using egui with winit"
|
description = "Bindings for using egui with winit"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/egui-winit"
|
homepage = "https://github.com/emilk/egui/tree/master/egui-winit"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -292,9 +292,8 @@ impl EpiIntegration {
|
||||||
}
|
}
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let app = &mut self.app; // TODO: remove when we update MSVR to 1.56
|
|
||||||
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
|
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
|
||||||
app.update(egui_ctx, &mut frame);
|
self.app.update(egui_ctx, &mut frame);
|
||||||
});
|
});
|
||||||
|
|
||||||
let needs_repaint = egui_output.needs_repaint;
|
let needs_repaint = egui_output.needs_repaint;
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Simple, portable immediate mode GUI library for Rust"
|
description = "Simple, portable immediate mode GUI library for Rust"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui"
|
homepage = "https://github.com/emilk/egui"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//! Try the live web demo: <https://emilk.github.io/egui/index.html>. Read more about egui at <https://github.com/emilk/egui>.
|
//! Try the live web demo: <https://emilk.github.io/egui/index.html>. Read more about egui at <https://github.com/emilk/egui>.
|
||||||
//!
|
//!
|
||||||
//! `egui` is in heavy development, with each new version having breaking changes.
|
//! `egui` is in heavy development, with each new version having breaking changes.
|
||||||
//! You need to have rust 1.54.0 or later to use `egui`.
|
//! You need to have rust 1.56.0 or later to use `egui`.
|
||||||
//!
|
//!
|
||||||
//! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template)
|
//! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template)
|
||||||
//! which uses [`eframe`](https://docs.rs/eframe).
|
//! which uses [`eframe`](https://docs.rs/eframe).
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui_demo_app"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui_demo_lib"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Example library for egui"
|
description = "Example library for egui"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/egui_demo_lib"
|
homepage = "https://github.com/emilk/egui/tree/master/egui_demo_lib"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui_glium"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for using egui natively using the glium library"
|
description = "Bindings for using egui natively using the glium library"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/egui_glium"
|
homepage = "https://github.com/emilk/egui/tree/master/egui_glium"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "egui_glow"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for using egui natively using the glow library"
|
description = "Bindings for using egui natively using the glow library"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/egui_glow"
|
homepage = "https://github.com/emilk/egui/tree/master/egui_glow"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -4,7 +4,8 @@ version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for compiling egui code to WASM for a web page"
|
description = "Bindings for compiling egui code to WASM for a web page"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/egui_web"
|
homepage = "https://github.com/emilk/egui/tree/master/egui_web"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/egui_web"
|
repository = "https://github.com/emilk/egui/tree/master/egui_web"
|
||||||
|
|
|
@ -198,9 +198,8 @@ impl AppRunner {
|
||||||
}
|
}
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let app = &mut self.app; // TODO: remove when we bump MSRV to 1.56
|
|
||||||
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
|
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
|
||||||
app.update(egui_ctx, &mut frame);
|
self.app.update(egui_ctx, &mut frame);
|
||||||
});
|
});
|
||||||
let clipped_meshes = self.egui_ctx.tessellate(shapes);
|
let clipped_meshes = self.egui_ctx.tessellate(shapes);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "emath"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Minimal 2D math library for GUI work"
|
description = "Minimal 2D math library for GUI work"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/emath"
|
homepage = "https://github.com/emilk/egui/tree/master/emath"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "epaint"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Minimal 2D graphics library for GUI work"
|
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"
|
homepage = "https://github.com/emilk/egui/tree/master/epaint"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -64,7 +64,6 @@ impl Mesh {
|
||||||
|
|
||||||
/// Are all indices within the bounds of the contained vertices?
|
/// Are all indices within the bounds of the contained vertices?
|
||||||
pub fn is_valid(&self) -> bool {
|
pub fn is_valid(&self) -> bool {
|
||||||
use std::convert::TryFrom;
|
|
||||||
if let Ok(n) = u32::try_from(self.vertices.len()) {
|
if let Ok(n) = u32::try_from(self.vertices.len()) {
|
||||||
self.indices.iter().all(|&i| i < n)
|
self.indices.iter().all(|&i| i < n)
|
||||||
} else {
|
} else {
|
||||||
|
@ -223,7 +222,6 @@ impl Mesh {
|
||||||
MAX_SIZE
|
MAX_SIZE
|
||||||
);
|
);
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
let mesh = Mesh16 {
|
let mesh = Mesh16 {
|
||||||
indices: self.indices[span_start..index_cursor]
|
indices: self.indices[span_start..index_cursor]
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -267,7 +265,6 @@ pub struct Mesh16 {
|
||||||
impl Mesh16 {
|
impl Mesh16 {
|
||||||
/// Are all indices within the bounds of the contained vertices?
|
/// Are all indices within the bounds of the contained vertices?
|
||||||
pub fn is_valid(&self) -> bool {
|
pub fn is_valid(&self) -> bool {
|
||||||
use std::convert::TryFrom;
|
|
||||||
if let Ok(n) = u16::try_from(self.vertices.len()) {
|
if let Ok(n) = u16::try_from(self.vertices.len()) {
|
||||||
self.indices.iter().all(|&i| i < n)
|
self.indices.iter().all(|&i| i < n)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,7 +3,8 @@ name = "epi"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Backend-agnostic interface for writing apps using egui"
|
description = "Backend-agnostic interface for writing apps using egui"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/epi"
|
homepage = "https://github.com/emilk/egui/tree/master/epi"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
|
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
|
||||||
|
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.54.0"
|
channel = "1.56.0"
|
||||||
components = [ "rustfmt", "clippy" ]
|
components = [ "rustfmt", "clippy" ]
|
||||||
targets = [ "wasm32-unknown-unknown" ]
|
targets = [ "wasm32-unknown-unknown" ]
|
||||||
|
|
Loading…
Reference in a new issue