willothy / worth

Adding single-character string literal RS-P1004
Anti-pattern
Minor
a year agoa year old
Calling push_str with single-character string literal "\n", use push with a character literal instead
303                                tok = &mut program[ip + 1];
304                                if !matches!(tok.kind, FmtTokenKind::Token(TokenType::Keyword)) {
305                                    tok = &mut program[ip];
306                                    tok.postfix.push_str("\n");307                                }
308                            }
309                        }