Remove usage of is_some_and (not supported in rustc 1.60)

This commit is contained in:
Graham Esau 2024-05-13 10:56:55 +01:00
parent 3b3870ca82
commit b87b6ebb6c

View file

@ -81,7 +81,7 @@ pub fn apply_internal_enum_tag(
deny_unknown_fields: bool, deny_unknown_fields: bool,
) { ) {
let obj = schema.ensure_object(); let obj = schema.ensure_object();
let is_unit = obj.get("type").is_some_and(|t| t.as_str() == Some("null")); let is_unit = obj.get("type").and_then(|t| t.as_str()) == Some("null");
obj.insert("type".to_owned(), "object".into()); obj.insert("type".to_owned(), "object".into());