Skip to content

Commit 8b10af2

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Exit early in set.issubset
Reviewed By: perehonchuk Differential Revision: D63740277 fbshipit-source-id: 23b31d2ff39b0d182f2078e2912cac6dd232b195
1 parent 920015e commit 8b10af2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

starlark/src/values/types/set/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ pub(crate) fn set_methods(builder: &mut MethodsBuilder) {
377377
return Ok(true);
378378
}
379379
let rhs = SetFromValue::from_value(other, heap)?;
380-
if rhs.is_empty() {
380+
if this.aref.content.len() > rhs.get().len() {
381381
return Ok(false);
382382
}
383383
for elem in this.aref.content.iter_hashed() {

0 commit comments

Comments
 (0)