refactor(server): rewrote cell access using new helpers and added ast-grep rules for it
This commit is contained in:
10
server/rules/safecell/new-inline.yaml
Normal file
10
server/rules/safecell/new-inline.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
id: safecell-new-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern: $CELL.write_inline(|$W| $BODY);
|
||||
follows:
|
||||
pattern: let mut $CELL = SafeCell::new($INIT);
|
||||
fix:
|
||||
template: let mut $CELL = SafeCell::new_inline(|$W| $BODY);
|
||||
expandStart:
|
||||
pattern: let mut $CELL = SafeCell::new($INIT)
|
||||
Reference in New Issue
Block a user