mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
style: use is_none_or instead of map_or per clippy warnings rust >= 1.85.0 (#1314)
This commit is contained in:
@@ -289,7 +289,7 @@ fn ensure_valid_json_schema(schema: &mut Value) {
|
||||
let is_object_type = params_obj
|
||||
.get("type")
|
||||
.and_then(|t| t.as_str())
|
||||
.map_or(true, |t| t == "object"); // Default to true if no type is specified
|
||||
.is_none_or(|t| t == "object"); // Default to true if no type is specified
|
||||
|
||||
// Only apply full schema validation to object types
|
||||
if is_object_type {
|
||||
|
||||
@@ -311,7 +311,7 @@ pub trait Router: Send + Sync + 'static {
|
||||
|| arguments
|
||||
.get(&arg.name)
|
||||
.and_then(Value::as_str)
|
||||
.map_or(true, str::is_empty))
|
||||
.is_none_or(str::is_empty))
|
||||
{
|
||||
return Err(RouterError::InvalidParams(format!(
|
||||
"Missing required argument: '{}'",
|
||||
|
||||
Reference in New Issue
Block a user