From 4e9a5ec5ea12f7a8d0ba552ec1e61bef8dfb55e2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 1 Apr 2021 18:01:31 +1000 Subject: [PATCH] fix a clippy lint --- rslib/src/browser_table.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/browser_table.rs b/rslib/src/browser_table.rs index b2c975bba..e6ef07406 100644 --- a/rslib/src/browser_table.rs +++ b/rslib/src/browser_table.rs @@ -206,12 +206,12 @@ impl Collection { if self.get_bool(BoolKey::BrowserTableShowNotesMode) { let columns = self .get_desktop_browser_note_columns() - .ok_or(AnkiError::invalid_input("Note columns not set."))?; + .ok_or_else(|| AnkiError::invalid_input("Note columns not set."))?; NoteRowContext::new(self, id)?.browser_row_for_id(&columns) } else { let columns = self .get_desktop_browser_card_columns() - .ok_or(AnkiError::invalid_input("Card columns not set."))?; + .ok_or_else(|| AnkiError::invalid_input("Card columns not set."))?; CardRowContext::new(self, id, card_render_required(&columns))? .browser_row_for_id(&columns) }