Skip to content

Commit 901afeb

Browse files
committed
1 parent 6a6166f commit 901afeb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/diff_walker.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ impl<F: FnMut(Change)> DiffWalker<F> {
149149
let lhs_additional_properties = lhs
150150
.object()
151151
.additional_properties
152-
.as_ref()
153-
.map_or(true, |x| x.clone().into_object().is_true());
152+
.as_ref().is_none_or(|x| x.clone().into_object().is_true());
154153

155154
for removed in lhs_props.difference(&rhs_props) {
156155
(self.cb)(Change {
@@ -537,8 +536,7 @@ impl JsonSchemaExt for SchemaObject {
537536
} else if self
538537
.subschemas()
539538
.not
540-
.as_ref()
541-
.map_or(false, |x| x.clone().into_object().is_true())
539+
.as_ref().is_some_and(|x| x.clone().into_object().is_true())
542540
{
543541
InternalJsonSchemaType::Never
544542
} else {

0 commit comments

Comments
 (0)