diff --git a/CHANGELOG.md b/CHANGELOG.md index 596f1a3e..873e337e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui-w ## Unreleased +## 0.18.1 - 2022-05-01 +* Change `Shape::Callback` from `&dyn Any` to `&mut dyn Any` to support more backends. + + ## 0.18.0 - 2022-04-30 ### Added ⭐ diff --git a/Cargo.lock b/Cargo.lock index 06f3d5ab..9bcdb912 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1100,7 +1100,7 @@ dependencies = [ [[package]] name = "egui" -version = "0.18.0" +version = "0.18.1" dependencies = [ "ahash 0.7.6", "epaint", @@ -1286,7 +1286,7 @@ dependencies = [ [[package]] name = "epaint" -version = "0.18.0" +version = "0.18.1" dependencies = [ "ab_glyph", "ahash 0.7.6", diff --git a/egui/Cargo.toml b/egui/Cargo.toml index 4a5e187a..1d28c1e0 100644 --- a/egui/Cargo.toml +++ b/egui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui" -version = "0.18.0" +version = "0.18.1" authors = ["Emil Ernerfeldt "] description = "An easy-to-use immediate mode GUI that runs on both web and native" edition = "2021" @@ -48,7 +48,7 @@ serde = ["dep:serde", "epaint/serde"] [dependencies] -epaint = { version = "0.18.0", path = "../epaint", default-features = false } +epaint = { version = "0.18.1", path = "../epaint", default-features = false } ahash = "0.7" nohash-hasher = "0.2" diff --git a/epaint/CHANGELOG.md b/epaint/CHANGELOG.md index 08084dfe..e0a42144 100644 --- a/epaint/CHANGELOG.md +++ b/epaint/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to the epaint crate will be documented in this file. ## Unreleased +## 0.18.1 - 2022-05-01 +* Change `Shape::Callback` from `&dyn Any` to `&mut dyn Any` to support more backends. + + ## 0.18.0 - 2022-04-30 * MSRV (Minimum Supported Rust Version) is now `1.60.0` ([#1467](https://github.com/emilk/egui/pull/1467)). * Add `Shape::Callback` for backend-specific painting ([#1351](https://github.com/emilk/egui/pull/1351)). diff --git a/epaint/Cargo.toml b/epaint/Cargo.toml index 598b875a..1c1ff6be 100644 --- a/epaint/Cargo.toml +++ b/epaint/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "epaint" -version = "0.18.0" +version = "0.18.1" authors = ["Emil Ernerfeldt "] description = "Minimal 2D graphics library for GUI work" edition = "2021" diff --git a/epaint/src/shape.rs b/epaint/src/shape.rs index 8660e5df..90b93596 100644 --- a/epaint/src/shape.rs +++ b/epaint/src/shape.rs @@ -754,12 +754,12 @@ pub struct PaintCallback { /// /// The rendering backend is also responsible for restoring any state, /// such as the bound shader program and vertex array. - pub callback: Arc, + pub callback: Arc, } impl PaintCallback { #[inline] - pub fn call(&self, info: &PaintCallbackInfo, render_ctx: &dyn std::any::Any) { + pub fn call(&self, info: &PaintCallbackInfo, render_ctx: &mut dyn std::any::Any) { (self.callback)(info, render_ctx); } }