Skip to main content

luaur_analysis/methods/
lint_unused_function_visit_linter_alt_b.rs

1use crate::records::lint_unused_function::LintUnusedFunction;
2use luaur_ast::records::ast_expr_global::AstExprGlobal;
3
4impl LintUnusedFunction {
5    pub fn visit_ast_expr_global(&mut self, node: *mut AstExprGlobal) -> bool {
6        let node_ref = unsafe { &*node };
7        let g = self.globals.get_or_insert(node_ref.name);
8        g.used = true;
9        true
10    }
11}