]> git.proxmox.com Git - ui/proxmox-yew-widget-toolkit.git/commit
widget: remove useless `try_from` call in theme density selector
authorShannon Sterz <s.sterz@proxmox.com>
Wed, 23 Oct 2024 12:52:56 +0000 (14:52 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 24 Oct 2024 05:42:36 +0000 (07:42 +0200)
commite77775fb78e4e7d1f9adf59d2f626710e0f38fea
tree59f4d8571a4348cf86f60a43873b5839dfb3f01a
parentba820c1a9d7b9cdf2549f3d0326116239945d100
widget: remove useless `try_from` call in theme density selector

the enum member `SetThemeDensity` already only takes values of type
`ThemeDensity`. so the `try_from` here converts from `ThemeDensity`
to `ThemeDensity` which is pointless and trivially must always
succeed. remove it so that the compiler stops complaining about
irrefutable patterns.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
src/widget/theme_density_selector.rs