Traverse the arguments with a closure that can mutate them.
(
&mut self,
pool: &mut ValueListPool,
mut f: F,
)
| 117 | |
| 118 | /// Traverse the arguments with a closure that can mutate them. |
| 119 | pub fn update_args<F: FnMut(BlockArg) -> BlockArg>( |
| 120 | &mut self, |
| 121 | pool: &mut ValueListPool, |
| 122 | mut f: F, |
| 123 | ) { |
| 124 | for raw in self.values.as_mut_slice(pool)[1..].iter_mut() { |
| 125 | let new = f(BlockArg::decode_from_value(*raw)); |
| 126 | *raw = new.encode_as_value(); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /// Remove the argument at ix from the argument list. |
| 131 | pub fn remove(&mut self, ix: usize, pool: &mut ValueListPool) { |
no test coverage detected