MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / for_local_id

Function for_local_id

src/transform/src/normalize_lets.rs:225–237  ·  view source on GitHub ↗

Logic mapped across each use of a `LocalId`.

(expr: &MirRelationExpr, mut logic: F)

Source from the content-addressed store, hash-verified

223
224 /// Logic mapped across each use of a `LocalId`.
225 pub(super) fn for_local_id<F>(expr: &MirRelationExpr, mut logic: F)
226 where
227 F: FnMut(LocalId),
228 {
229 expr.visit_pre(|expr| {
230 if let MirRelationExpr::Get {
231 id: Id::Local(i), ..
232 } = expr
233 {
234 logic(*i);
235 }
236 });
237 }
238
239 /// Populates `counts` with the number of uses of each local identifier in `expr`.
240 pub(super) fn count_local_id_uses(

Callers 2

count_local_id_usesFunction · 0.85
inline_lets_coreFunction · 0.85

Calls 1

visit_preMethod · 0.45

Tested by

no test coverage detected