diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d16ceceee..05d5ebb366 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Custom` variant to `command::Action`. [#2146](https://github.com/iced-rs/iced/pull/2146) - Mouse movement events for `MouseArea`. [#2147](https://github.com/iced-rs/iced/pull/2147) - Dracula, Nord, Solarized, and Gruvbox variants for `Theme`. [#2170](https://github.com/iced-rs/iced/pull/2170) +- `From where T: Into` for `svg::Handle`. [#2235](https://github.com/iced-rs/iced/pull/2235) ### Changed - Enable WebGPU backend in `wgpu` by default instead of WebGL. [#2068](https://github.com/iced-rs/iced/pull/2068) @@ -108,6 +109,7 @@ Many thanks to... - @Decodetalkers - @derezzedex - @dtzxporter +- @fogarecious - @GyulyVGC - @hicaru - @ids1024 diff --git a/core/src/svg.rs b/core/src/svg.rs index 54e9434e05..d63e3c9554 100644 --- a/core/src/svg.rs +++ b/core/src/svg.rs @@ -50,6 +50,15 @@ impl Handle { } } +impl From for Handle +where + T: Into, +{ + fn from(path: T) -> Handle { + Handle::from_path(path.into()) + } +} + impl Hash for Handle { fn hash(&self, state: &mut H) { self.id.hash(state);