Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rust-toolchain file #1663

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
toolchain: stable
uses: dsherret/rust-toolchain-file@v1

- uses: Swatinem/rust-cache@v2

Expand Down
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.72.0"
components = [ "clippy", "rustfmt" ]
12 changes: 6 additions & 6 deletions src/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ pub(crate) const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[
r#" local common=("#,
),
(
r#"'*--set=[Override <VARIABLE> with <VALUE>]' \"#,
r#"'*--set[Override <VARIABLE> with <VALUE>]: :_just_variables' \"#,
r"'*--set=[Override <VARIABLE> with <VALUE>]' \",
r"'*--set[Override <VARIABLE> with <VALUE>]: :_just_variables' \",
),
(
r#"'-s+[Show information about <RECIPE>]' \
'--show=[Show information about <RECIPE>]' \"#,
r#"'-s+[Show information about <RECIPE>]: :_just_commands' \
'--show=[Show information about <RECIPE>]: :_just_commands' \"#,
r"'-s+[Show information about <RECIPE>]' \
'--show=[Show information about <RECIPE>]' \",
r"'-s+[Show information about <RECIPE>]: :_just_commands' \
'--show=[Show information about <RECIPE>]: :_just_commands' \",
),
(
"'::ARGUMENTS -- Overrides and recipe(s) to run, defaulting to the first recipe in the \
Expand Down
6 changes: 3 additions & 3 deletions src/justfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down
12 changes: 6 additions & 6 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))),
}

Expand Down Expand Up @@ -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")))),
}

Expand Down
12 changes: 6 additions & 6 deletions tests/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down
12 changes: 6 additions & 6 deletions tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,19 @@ test! {

test! {
name: indented_raw_string_escapes,
justfile: r#"
justfile: r"
a := '''
foo\n
bar
'''

@default:
printf %s '{{a}}'
"#,
stdout: r#"
",
stdout: r"
foo\n
bar
"#,
",
}

test! {
Expand All @@ -353,7 +353,7 @@ test! {

test! {
name: indented_backtick_string_escapes,
justfile: r#"
justfile: r"
a := ```
printf %s '
foo\n
Expand All @@ -363,7 +363,7 @@ test! {

@default:
printf %s '{{a}}'
"#,
",
stdout: "\n\nfoo\\n\nbar",
}

Expand Down
Loading