fix(clippy): use is_none_or instead of map_or for Option check

is_none_or is stable since Rust 1.82 and preferred by clippy over
map_or(true, ...) pattern.

https://claude.ai/code/session_012nbbEyFXjDwdZZrHg7gFNK
This commit is contained in:
Claude
2026-03-28 15:10:20 +00:00
parent 427f908e71
commit 30feaabb7c
+1 -1
View File
@@ -1151,7 +1151,7 @@ impl Agent {
.await;
let mut sess = session.lock().await;
if let Some(thread) = sess.threads.get(&target_thread_id) {
let authorized = thread.source_channel.as_ref().map_or(true, |src| {
let authorized = thread.source_channel.as_ref().is_none_or(|src| {
src == &message.channel
|| message.channel == "web"
|| message.channel == "gateway"