From dfd38a95592d06831389130621033ae675e5ad04 Mon Sep 17 00:00:00 2001 From: Fernando Possebon Date: Sun, 2 Aug 2026 16:42:40 -0300 Subject: [PATCH] fix(core): use is_none_or to satisfy clippy on main (#5162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `cargo clippy --all-targets -- -D warnings` fails on main: error: this `map_or` can be simplified --> crates/dbx-core/src/table_structure_sql/triggers.rs:58:32 = note: `-D clippy::unnecessary-map-or` implied by `-D warnings` `Option::map_or(true, f)` is `Option::is_none_or(f)` — same result for both None and Some, so this is a lint fix with no behavior change. Claude-Session: https://claude.ai/code/session_01TKcC15gEuQBHMidPCFFYwn Co-authored-by: Claude Fable 5 --- crates/dbx-core/src/table_structure_sql/triggers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/dbx-core/src/table_structure_sql/triggers.rs b/crates/dbx-core/src/table_structure_sql/triggers.rs index cc45356f9e..6d16ac6371 100644 --- a/crates/dbx-core/src/table_structure_sql/triggers.rs +++ b/crates/dbx-core/src/table_structure_sql/triggers.rs @@ -55,7 +55,7 @@ pub(super) fn build_trigger_sql(options: &TableStructureSqlOptions, warnings: &m } fn has_trigger_edit(trigger: &EditableStructureTrigger) -> bool { - trigger.marked_for_drop || trigger.original.as_ref().map_or(true, |original| has_trigger_change(trigger, original)) + trigger.marked_for_drop || trigger.original.as_ref().is_none_or(|original| has_trigger_change(trigger, original)) } fn has_trigger_change(trigger: &EditableStructureTrigger, original: &TriggerInfo) -> bool {