MCPcopy Index your code
hub / github.com/RustPython/RustPython / make_set

Method make_set

crates/vm/src/stdlib/marshal.rs:426–435  ·  view source on GitHub ↗
(
            &self,
            it: impl Iterator<Item = Self::Value>,
        )

Source from the content-addressed store, hash-verified

424 Ok(self.0.ctx.new_list(it.collect()).into())
425 }
426 fn make_set(
427 &self,
428 it: impl Iterator<Item = Self::Value>,
429 ) -> Result<Self::Value, marshal::MarshalError> {
430 let set = PySet::default().into_ref(&self.0.ctx);
431 for elem in it {
432 set.add(elem, self.0).unwrap()
433 }
434 Ok(set.into())
435 }
436 fn make_frozenset(
437 &self,
438 it: impl Iterator<Item = Self::Value>,

Callers

nothing calls this directly

Calls 3

into_refMethod · 0.45
unwrapMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected