refactor(menu): remove redundant entity argument on MenuActions
This commit is contained in:
parent
b3bce0740e
commit
31ea71deef
2 changed files with 6 additions and 10 deletions
|
|
@ -31,7 +31,7 @@ use crate::widget::segmented_button::Entity;
|
|||
/// impl MenuAction for MyAction {
|
||||
/// type Message = MyMessage;
|
||||
///
|
||||
/// fn message(&self, entity: Option<Entity>) -> Self::Message {
|
||||
/// fn message(&self) -> Self::Message {
|
||||
/// match self {
|
||||
/// MyAction::Open => MyMessage::Open,
|
||||
/// MyAction::Save => MyMessage::Save,
|
||||
|
|
@ -46,12 +46,8 @@ pub trait MenuAction: Clone + Copy + Eq + PartialEq {
|
|||
|
||||
/// Returns a message of type `Self::Message` when the action is triggered.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `entity` - An optional `Entity` that may be associated with the action.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// * `Self::Message` - The message that is produced when the action is triggered.
|
||||
fn message(&self, entity: Option<Entity>) -> Self::Message;
|
||||
fn message(&self) -> Self::Message;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue