We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f10ef49 commit 74a5dd5Copy full SHA for 74a5dd5
starlark/src/values/types/set/value.rs
@@ -276,12 +276,13 @@ where
276
277
// Set intersection
278
fn bit_and(&self, rhs: Value<'v>, heap: &'v Heap) -> crate::Result<Value<'v>> {
279
+ let rhs = SetRef::unpack_value_opt(rhs)
280
+ .map_or_else(|| ValueError::unsupported_with(self, "&", rhs), Ok)?;
281
+
282
let mut items = SmallSet::new();
283
if self.0.content().is_empty() {
284
return Ok(heap.alloc(SetData { content: items }));
285
}
- let rhs = SetRef::unpack_value_opt(rhs)
- .map_or_else(|| ValueError::unsupported_with(self, "&", rhs), Ok)?;
286
287
for h in rhs.aref.iter_hashed() {
288
if self.0.content().contains_hashed(h.as_ref()) {
0 commit comments