Skip to content

Commit

Permalink
Address seemingly new clippy nits that block unrelated PRs (FuelLabs#874
Browse files Browse the repository at this point in the history
)

* Address seemingly new clippy nits that block unrelated PRs

* Force clippys toolchain to match rest of CI. Use rust-cache for deps.
  • Loading branch information
mitchmindtree authored Mar 4, 2022
1 parent fff7c4e commit e2fd41e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/[email protected]
name: Check Clippy Linter
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Check Clippy Linter
uses: actions-rs/cargo@v1
with:
token: ${{ github.token }}
command: clippy
args: --all-features --all-targets -- -D warnings

cargo-fmt-check:
Expand Down
2 changes: 1 addition & 1 deletion sway-core/src/asm_generation/from_ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ mod tests {
Some("asm") | Some("disabled") => (),
_ => panic!(
"File with invalid extension in tests dir: {:?}",
path.file_name().unwrap_or_else(|| path.as_os_str())
path.file_name().unwrap_or(path.as_os_str())
),
}
}
Expand Down
4 changes: 2 additions & 2 deletions sway-core/src/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ mod tests {
Some("ir") | Some("disabled") => (),
_ => panic!(
"File with invalid extension in tests dir: {:?}",
path.file_name().unwrap_or_else(|| path.as_os_str())
path.file_name().unwrap_or(path.as_os_str())
),
}
}
Expand Down Expand Up @@ -1757,7 +1757,7 @@ mod tests {
Some("sw") | Some("disabled") => (),
_ => panic!(
"File with invalid extension in tests dir: {:?}",
path.file_name().unwrap_or_else(|| path.as_os_str())
path.file_name().unwrap_or(path.as_os_str())
),
}
}
Expand Down
4 changes: 2 additions & 2 deletions sway-ir/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ fn ir_to_ir_tests() {
} else {
panic!(
"File which doesn't match valid passes: {:?}",
path.file_name().unwrap_or_else(|| path.as_os_str())
path.file_name().unwrap_or(path.as_os_str())
);
}
}
Some("out_ir") => (),
_ => panic!(
"File with invalid extension in tests dir: {:?}",
path.file_name().unwrap_or_else(|| path.as_os_str())
path.file_name().unwrap_or(path.as_os_str())
),
}
}
Expand Down

0 comments on commit e2fd41e

Please sign in to comment.