mirror of
https://github.com/oxalica/nil.git
synced 2024-11-22 11:22:46 +03:00
Fix clippy warnings
This commit is contained in:
parent
4bdcfcfe38
commit
bd7e2e2de7
@ -148,7 +148,7 @@ regex_dfa! {
|
||||
DQUOTE = r#"""#,
|
||||
// Yes, we parse one UTF-8 encoded char here, to avoid break into code units.
|
||||
// We can assume the input is already a valid UTF-8 string.
|
||||
STRING_ESCAPE = r#"\\([\x00-\x7F]|[\x80-\xFF][\x80-\xBF]*)"#,
|
||||
STRING_ESCAPE = r"\\([\x00-\x7F]|[\x80-\xFF][\x80-\xBF]*)",
|
||||
DOLLAR_L_CURLY = r"\$\{",
|
||||
// `$$` makes the second `$` loses the special meaning.
|
||||
STRING_FRAGMENT = r"\$\$",
|
||||
@ -161,7 +161,7 @@ regex_dfa! {
|
||||
INDENT_STRING_TOKEN_DFA {
|
||||
// The order matters!
|
||||
// See comments in STRING_TOKEN_DFA's STRING_ESCAPE.
|
||||
STRING_ESCAPE = r#"''\\([\x00-\x7F]|[\x80-\xFF][\x80-\xBF]*)|''\$|'''"#,
|
||||
STRING_ESCAPE = r"''\\([\x00-\x7F]|[\x80-\xFF][\x80-\xBF]*)|''\$|'''",
|
||||
QUOTE2 = r"''",
|
||||
DOLLAR_L_CURLY = r"\$\{",
|
||||
// `$$` makes the second `$` loses the special meaning.
|
||||
@ -513,7 +513,7 @@ mod tests {
|
||||
#[test]
|
||||
fn indent_string() {
|
||||
check_lex(
|
||||
r#"'' a'''b$c''\nd''${e${{} ''f''} ''"#,
|
||||
r"'' a'''b$c''\nd''${e${{} ''f''} ''",
|
||||
expect![[r#"
|
||||
QUOTE2 "''"
|
||||
STRING_FRAGMENT " a"
|
||||
@ -548,8 +548,8 @@ mod tests {
|
||||
);
|
||||
|
||||
check_lex(
|
||||
r#"''''\n''\_''\
|
||||
''\ΣΣ''"#,
|
||||
r"''''\n''\_''\
|
||||
''\ΣΣ''",
|
||||
expect![[r#"
|
||||
QUOTE2 "''"
|
||||
STRING_ESCAPE "''\\n"
|
||||
|
@ -70,6 +70,9 @@ rec {
|
||||
"-D" "clippy::missing-panics-doc"
|
||||
"-D" "clippy::semicolon_if_nothing_returned"
|
||||
"-D" "clippy::uninlined_format_args"
|
||||
|
||||
# FIXME: https://github.com/rust-lang/rust-clippy/issues/11436
|
||||
"-A" "clippy::missing_panics_doc"
|
||||
];
|
||||
|
||||
pre-commit = pkgs.writeShellScriptBin "pre-commit" ''
|
||||
|
Loading…
Reference in New Issue
Block a user