Skip to content

Commit

Permalink
Record widget: remove record type getter
Browse files Browse the repository at this point in the history
  • Loading branch information
andy128k committed Oct 29, 2023
1 parent 8359466 commit f037898
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ui/edit_record/record_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ mod imp {
impl WidgetImpl for RecordWidget {}

impl RecordWidget {
fn record_type(&self) -> Option<&'static RecordType> {
self.form.borrow().as_ref().map(|form| form.record_type())
}

fn set_record_type(&self, record_type: &'static RecordType) {
if self.record_type() == Some(record_type) {
if self
.form
.borrow()
.as_ref()
.map_or(false, |form| form.record_type() == record_type)
{
return;
}

Expand Down

0 comments on commit f037898

Please sign in to comment.