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

Method from_components

crates/vm/src/builtins/union.rs:44–52  ·  view source on GitHub ↗

Create a new union from dedup result (internal use)

(result: UnionComponents, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

42impl PyUnion {
43 /// Create a new union from dedup result (internal use)
44 fn from_components(result: UnionComponents, vm: &VirtualMachine) -> PyResult<Self> {
45 let parameters = make_parameters(&result.args, vm)?;
46 Ok(Self {
47 args: result.args,
48 hashable_args: result.hashable_args,
49 unhashable_args: result.unhashable_args,
50 parameters,
51 })
52 }
53
54 /// Direct access to args field (_Py_union_args)
55 #[inline]

Callers

nothing calls this directly

Calls 1

make_parametersFunction · 0.70

Tested by

no test coverage detected