Implement From<&Handle> for image::Handle
This commit is contained in:
parent
169667ef1b
commit
e84070acef
3 changed files with 36 additions and 20 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue