note: remove unnecessary derive macros from NoteAction

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-04-29 13:04:50 -04:00
parent b9e2daf47a
commit e6212e5d17
4 changed files with 8 additions and 12 deletions

View File

@@ -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<'_, '_> {

View File

@@ -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() {