mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user