(f: F)
| 158 | }); |
| 159 | |
| 160 | fn with<F, R>(f: F) -> R where F: FnOnce(&mut Inner) -> R { |
| 161 | let mut g = INNER.lock().unwrap(); |
| 162 | if g.nodes.is_empty() { |
| 163 | g.nodes.push(None); // sentinel at index 0 |
| 164 | } |
| 165 | f(&mut *g) |
| 166 | } |
| 167 | |
| 168 | // ============================================================ |
| 169 | // Mutations — called from bloom_scene_* FFI in lib.rs |
no test coverage detected