Better deprecation of SelectableLabel

This commit is contained in:
Emil Ernerfeldt 2025-07-07 09:33:08 +02:00
parent 7ac137bfc1
commit a811b975c2
1 changed files with 12 additions and 1 deletions

View File

@ -1,2 +1,13 @@
#[deprecated = "SelectableLabel has been removed. Use Button::selectable() instead"]
#![expect(deprecated, clippy::new_ret_no_self)]
use crate::WidgetText;
#[deprecated = "Use `Button::selectable()` instead"]
pub struct SelectableLabel {}
impl SelectableLabel {
#[deprecated = "Use `Button::selectable()` instead"]
pub fn new(selected: bool, text: impl Into<WidgetText>) -> super::Button<'static> {
crate::Button::selectable(selected, text)
}
}