Implement From<&Handle> for image::Handle

This commit is contained in:
Héctor Ramón Jiménez 2024-08-03 16:20:12 +02:00
parent 169667ef1b
commit e84070acef
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 36 additions and 20 deletions

View file

@ -43,7 +43,7 @@ pub struct Image<Handle> {
impl<Handle> Image<Handle> {
/// Creates a new [`Image`] with the given path.
pub fn new<T: Into<Handle>>(handle: T) -> Self {
pub fn new(handle: impl Into<Handle>) -> Self {
Image {
handle: handle.into(),
width: Length::Shrink,