MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / tuple_lower

Method tuple_lower

crates/rust/src/bindgen.rs:144–156  ·  view source on GitHub ↗
(&mut self, tuple: &Tuple, operand: &str, results: &mut Vec<String>)

Source from the content-addressed store, hash-verified

142 }
143
144 fn tuple_lower(&mut self, tuple: &Tuple, operand: &str, results: &mut Vec<String>) {
145 let tmp = self.tmp();
146 self.push_str("let (");
147 for i in 0..tuple.types.len() {
148 let arg = format!("t{tmp}_{i}");
149 self.push_str(&arg);
150 self.push_str(", ");
151 results.push(arg);
152 }
153 self.push_str(") = ");
154 self.push_str(operand);
155 self.push_str(";\n");
156 }
157
158 fn tuple_lift(&mut self, operands: &[String], results: &mut Vec<String>) {
159 if operands.len() == 1 {

Callers 1

emitMethod · 0.80

Calls 3

tmpMethod · 0.45
push_strMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected