mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-21 06:00:39 +00:00
fix(core): use is_none_or to satisfy clippy on main (#5162)
`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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ed1e36912c
commit
dfd38a9559
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user