Skip to content

Commit c60d17b

Browse files
authored
Set MSRV to 1.56.0 and use rust edition 2021 (#998)
1 parent ee00214 commit c60d17b

File tree

18 files changed

+36
-29
lines changed

18 files changed

+36
-29
lines changed

.github/workflows/rust.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions-rs/toolchain@v1
1818
with:
1919
profile: minimal
20-
toolchain: 1.54.0
20+
toolchain: 1.56.0
2121
override: true
2222
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
2323
- uses: actions-rs/cargo@v1
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions-rs/toolchain@v1
3333
with:
3434
profile: minimal
35-
toolchain: 1.54.0
35+
toolchain: 1.56.0
3636
override: true
3737
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
3838
- uses: actions-rs/cargo@v1
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions-rs/toolchain@v1
4949
with:
5050
profile: minimal
51-
toolchain: 1.54.0
51+
toolchain: 1.56.0
5252
override: true
5353
- run: rustup target add wasm32-unknown-unknown
5454
- uses: actions-rs/cargo@v1
@@ -64,7 +64,7 @@ jobs:
6464
- uses: actions-rs/toolchain@v1
6565
with:
6666
profile: minimal
67-
toolchain: 1.54.0
67+
toolchain: 1.56.0
6868
override: true
6969
- run: rustup target add wasm32-unknown-unknown
7070
- uses: actions-rs/cargo@v1
@@ -80,7 +80,7 @@ jobs:
8080
- uses: actions-rs/toolchain@v1
8181
with:
8282
profile: minimal
83-
toolchain: 1.54.0
83+
toolchain: 1.56.0
8484
override: true
8585
- 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
8686
- uses: actions-rs/cargo@v1
@@ -96,7 +96,7 @@ jobs:
9696
- uses: actions-rs/toolchain@v1
9797
with:
9898
profile: minimal
99-
toolchain: 1.54.0
99+
toolchain: 1.56.0
100100
override: true
101101
- run: rustup component add rustfmt
102102
- uses: actions-rs/cargo@v1
@@ -112,7 +112,7 @@ jobs:
112112
- uses: actions-rs/toolchain@v1
113113
with:
114114
profile: minimal
115-
toolchain: 1.54.0
115+
toolchain: 1.56.0
116116
override: true
117117
- run: rustup component add clippy
118118
- 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:
129129
- uses: actions-rs/toolchain@v1
130130
with:
131131
profile: minimal
132-
toolchain: 1.54.0
132+
toolchain: 1.56.0
133133
override: true
134134
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
135135
- 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:
142142
- uses: actions-rs/toolchain@v1
143143
with:
144144
profile: minimal
145-
toolchain: 1.54.0
145+
toolchain: 1.56.0
146146
override: true
147147
- run: sudo apt-get update && sudo apt-get install libspeechd-dev
148148
- run: rustup target add wasm32-unknown-unknown

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
2121
* Add `Button::image_and_text` ([#832](https://github.com/emilk/egui/pull/832)).
2222

2323
### Changed 🔧
24+
* MSRV (Minimum Supported Rust Version) is now `1.56.0`.
2425
* `ui.add(Button::new("…").text_color(…))` is now `ui.button(RichText::new("…").color(…))` (same for `Label` )([#855](https://github.com/emilk/egui/pull/855)).
2526
* 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)).
2627
* Replace `CtxRef::begin_frame` and `end_frame` with `CtxRef::run` ([#872](https://github.com/emilk/egui/pull/872)).

eframe/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "eframe"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "egui framework - write GUI apps that compiles to web and/or natively"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/eframe"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

egui-winit/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui-winit"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Bindings for using egui with winit"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/egui-winit"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

egui-winit/src/epi.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,8 @@ impl EpiIntegration {
292292
}
293293
.build();
294294

295-
let app = &mut self.app; // TODO: remove when we update MSVR to 1.56
296295
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
297-
app.update(egui_ctx, &mut frame);
296+
self.app.update(egui_ctx, &mut frame);
298297
});
299298

300299
let needs_repaint = egui_output.needs_repaint;

egui/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Simple, portable immediate mode GUI library for Rust"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui"
89
license = "MIT OR Apache-2.0"
910
readme = "../README.md"

egui/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Try the live web demo: <https://emilk.github.io/egui/index.html>. Read more about egui at <https://github.com/emilk/egui>.
44
//!
55
//! `egui` is in heavy development, with each new version having breaking changes.
6-
//! You need to have rust 1.54.0 or later to use `egui`.
6+
//! You need to have rust 1.56.0 or later to use `egui`.
77
//!
88
//! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template)
99
//! which uses [`eframe`](https://docs.rs/eframe).

egui_demo_app/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui_demo_app"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
publish = false
89

910
[lib]

egui_demo_lib/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui_demo_lib"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Example library for egui"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/egui_demo_lib"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

egui_glium/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui_glium"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Bindings for using egui natively using the glium library"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/egui_glium"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

egui_glow/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "egui_glow"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Bindings for using egui natively using the glow library"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/egui_glow"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

egui_web/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Bindings for compiling egui code to WASM for a web page"
66
license = "MIT OR Apache-2.0"
7-
edition = "2018"
7+
edition = "2021"
8+
rust-version = "1.56"
89
homepage = "https://github.com/emilk/egui/tree/master/egui_web"
910
readme = "README.md"
1011
repository = "https://github.com/emilk/egui/tree/master/egui_web"

egui_web/src/backend.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ impl AppRunner {
198198
}
199199
.build();
200200

201-
let app = &mut self.app; // TODO: remove when we bump MSRV to 1.56
202201
let (egui_output, shapes) = self.egui_ctx.run(raw_input, |egui_ctx| {
203-
app.update(egui_ctx, &mut frame);
202+
self.app.update(egui_ctx, &mut frame);
204203
});
205204
let clipped_meshes = self.egui_ctx.tessellate(shapes);
206205

emath/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "emath"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Minimal 2D math library for GUI work"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/emath"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

epaint/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "epaint"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Minimal 2D graphics library for GUI work"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/epaint"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

epaint/src/mesh.rs

-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ impl Mesh {
6464

6565
/// Are all indices within the bounds of the contained vertices?
6666
pub fn is_valid(&self) -> bool {
67-
use std::convert::TryFrom;
6867
if let Ok(n) = u32::try_from(self.vertices.len()) {
6968
self.indices.iter().all(|&i| i < n)
7069
} else {
@@ -223,7 +222,6 @@ impl Mesh {
223222
MAX_SIZE
224223
);
225224

226-
use std::convert::TryFrom;
227225
let mesh = Mesh16 {
228226
indices: self.indices[span_start..index_cursor]
229227
.iter()
@@ -267,7 +265,6 @@ pub struct Mesh16 {
267265
impl Mesh16 {
268266
/// Are all indices within the bounds of the contained vertices?
269267
pub fn is_valid(&self) -> bool {
270-
use std::convert::TryFrom;
271268
if let Ok(n) = u16::try_from(self.vertices.len()) {
272269
self.indices.iter().all(|&i| i < n)
273270
} else {

epi/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name = "epi"
33
version = "0.15.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
description = "Backend-agnostic interface for writing apps using egui"
6-
edition = "2018"
6+
edition = "2021"
7+
rust-version = "1.56"
78
homepage = "https://github.com/emilk/egui/tree/master/epi"
89
license = "MIT OR Apache-2.0"
910
readme = "README.md"

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
66

77
[toolchain]
8-
channel = "1.54.0"
8+
channel = "1.56.0"
99
components = [ "rustfmt", "clippy" ]
1010
targets = [ "wasm32-unknown-unknown" ]

0 commit comments

Comments
 (0)