From 72e5b1724227ee2519a048c0ab8fbc106c65d55f Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 8 Oct 2023 19:34:05 -0700 Subject: [PATCH] Placate clippy (#1689) --- src/completions.rs | 12 ++++++------ src/justfile.rs | 6 +++--- src/parser.rs | 12 ++++++------ tests/misc.rs | 12 ++++++------ tests/string.rs | 12 ++++++------ 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/completions.rs b/src/completions.rs index 696f57c..3d805ff 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -17,14 +17,14 @@ pub(crate) const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ r#" local common=("#, ), ( - r#"'*--set=[Override with ]' \"#, - r#"'*--set[Override with ]: :_just_variables' \"#, + r"'*--set=[Override with ]' \", + r"'*--set[Override with ]: :_just_variables' \", ), ( - r#"'-s+[Show information about ]' \ -'--show=[Show information about ]' \"#, - r#"'-s+[Show information about ]: :_just_commands' \ -'--show=[Show information about ]: :_just_commands' \"#, + r"'-s+[Show information about ]' \ +'--show=[Show information about ]' \", + r"'-s+[Show information about ]: :_just_commands' \ +'--show=[Show information about ]: :_just_commands' \", ), ( "'::ARGUMENTS -- Overrides and recipe(s) to run, defaulting to the first recipe in the \ diff --git a/src/justfile.rs b/src/justfile.rs index a8ae406..ee46e33 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -745,13 +745,13 @@ foo +a="Hello": test! { parse_raw_string_default, - r#" + r" foo a='b\t': - "#, - r#"foo a='b\t':"#, + ", + r"foo a='b\t':", } test! { diff --git a/src/parser.rs b/src/parser.rs index 08045ef..04c4a9d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1420,23 +1420,23 @@ mod tests { test! { name: indented_backtick, - text: r#" + text: r" x := ``` \tfoo\t \tbar\n ``` - "#, + ", tree: (justfile (assignment x (backtick "\\tfoo\\t\n\\tbar\\n\n"))), } test! { name: indented_backtick_no_dedent, - text: r#" + text: r" x := ``` \tfoo\t \tbar\n ``` - "#, + ", tree: (justfile (assignment x (backtick "\\tfoo\\t\n \\tbar\\n\n"))), } @@ -1475,12 +1475,12 @@ mod tests { test! { name: parse_raw_string_default, - text: r#" + text: r" foo a='b\t': - "#, + ", tree: (justfile (recipe foo (params (a "b\\t")))), } diff --git a/tests/misc.rs b/tests/misc.rs index df6f1ca..2c64d5d 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -1000,36 +1000,36 @@ a Z="\t z": test! { name: line_continuation_with_space, - justfile: r#" + justfile: r" foo: echo a\ b \ c -"#, +", stdout: "ab c\n", stderr: "echo ab c\n", } test! { name: line_continuation_with_quoted_space, - justfile: r#" + justfile: r" foo: echo 'a\ b \ c' -"#, +", stdout: "ab c\n", stderr: "echo 'ab c'\n", } test! { name: line_continuation_no_space, - justfile: r#" + justfile: r" foo: echo a\ b\ c -"#, +", stdout: "abc\n", stderr: "echo abc\n", } diff --git a/tests/string.rs b/tests/string.rs index a7e0894..c932634 100644 --- a/tests/string.rs +++ b/tests/string.rs @@ -318,7 +318,7 @@ test! { test! { name: indented_raw_string_escapes, - justfile: r#" + justfile: r" a := ''' foo\n bar @@ -326,11 +326,11 @@ test! { @default: printf %s '{{a}}' - "#, - stdout: r#" + ", + stdout: r" foo\n bar - "#, + ", } test! { @@ -353,7 +353,7 @@ test! { test! { name: indented_backtick_string_escapes, - justfile: r#" + justfile: r" a := ``` printf %s ' foo\n @@ -363,7 +363,7 @@ test! { @default: printf %s '{{a}}' - "#, + ", stdout: "\n\nfoo\\n\nbar", }