Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Sep 23, 2022
1 parent 5c17fec commit b4477fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa_engine/src/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ impl<'context> FunctionBuilder<'context> {
ref mut constructor,
..
} => {
*constructor = yes.then(|| ConstructorKind::Base);
*constructor = yes.then_some(ConstructorKind::Base);
}
Function::Ordinary { .. }
| Function::Generator { .. }
Expand Down Expand Up @@ -2146,7 +2146,7 @@ impl<'context> ConstructorBuilder<'context> {
/// Default is `true`
#[inline]
pub fn constructor(&mut self, constructor: bool) -> &mut Self {
self.constructor = constructor.then(|| ConstructorKind::Base);
self.constructor = constructor.then_some(ConstructorKind::Base);
self
}

Expand Down

0 comments on commit b4477fe

Please sign in to comment.