Use closures for Svg::style
This commit is contained in:
parent
66dce4865e
commit
71b9b3c3b1
3 changed files with 31 additions and 25 deletions
|
|
@ -362,9 +362,11 @@ pub fn image<Handle>(handle: impl Into<Handle>) -> crate::Image<Handle> {
|
|||
/// [`Svg`]: crate::Svg
|
||||
/// [`Handle`]: crate::svg::Handle
|
||||
#[cfg(feature = "svg")]
|
||||
pub fn svg<Theme>(handle: impl Into<core::svg::Handle>) -> crate::Svg<Theme>
|
||||
pub fn svg<'a, Theme>(
|
||||
handle: impl Into<core::svg::Handle>,
|
||||
) -> crate::Svg<'a, Theme>
|
||||
where
|
||||
Theme: crate::svg::DefaultStyle,
|
||||
Theme: crate::svg::DefaultStyle + 'a,
|
||||
{
|
||||
crate::Svg::new(handle)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue