note: remove unnecessary derive macros from NoteAction
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ pub struct NoteContents<'a, 'd> {
|
||||
txn: &'a Transaction,
|
||||
note: &'a Note<'a>,
|
||||
options: NoteOptions,
|
||||
action: Option<NoteAction>,
|
||||
pub action: Option<NoteAction>,
|
||||
}
|
||||
|
||||
impl<'a, 'd> NoteContents<'a, 'd> {
|
||||
@@ -38,10 +38,6 @@ impl<'a, 'd> NoteContents<'a, 'd> {
|
||||
action: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn action(&self) -> &Option<NoteAction> {
|
||||
&self.action
|
||||
}
|
||||
}
|
||||
|
||||
impl egui::Widget for &mut NoteContents<'_, '_> {
|
||||
|
||||
@@ -442,8 +442,8 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
|
||||
ui.add(&mut contents);
|
||||
|
||||
if let Some(action) = contents.action() {
|
||||
note_action = Some(action.clone());
|
||||
if let Some(action) = contents.action {
|
||||
note_action = Some(action);
|
||||
}
|
||||
|
||||
if self.options().has_actionbar() {
|
||||
@@ -506,8 +506,8 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
);
|
||||
ui.add(&mut contents);
|
||||
|
||||
if let Some(action) = contents.action() {
|
||||
note_action = Some(action.clone());
|
||||
if let Some(action) = contents.action {
|
||||
note_action = Some(action);
|
||||
}
|
||||
|
||||
if self.options().has_actionbar() {
|
||||
|
||||
Reference in New Issue
Block a user