Skip to content

Commit 0274bdf

Browse files
authored
Use rustup for fmt and clippy instead of action-rs (#2106)
* Use rustup for fmt and clippy instead of action-rs * Fix clippy
1 parent 83f57dd commit 0274bdf

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,18 @@ jobs:
4444

4545
steps:
4646
- uses: actions/checkout@v4
47-
- name: Install Rust Stable toolchain
48-
uses: actions-rs/toolchain@v1
49-
with:
50-
profile: minimal
51-
toolchain: stable
52-
override: true
53-
47+
48+
- name: Install fmt and clippy
49+
run: |
50+
rustup component add rustfmt
51+
rustup component add clippy
52+
5453
- name: Run cargo fmt
5554
run: cargo fmt --all -- --check
56-
57-
- uses: actions-rs/clippy-check@v1
58-
with:
59-
token: ${{ secrets.GITHUB_TOKEN }}
60-
args: --all-features
61-
55+
56+
- name: Run clippy
57+
run: cargo clippy --all-features -- -D warnings
58+
6259
- name: Build
6360
run: cargo build
6461

crates/parser/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ fn parse_custom_script_rule(
180180
let mut pairs = record.into_inner();
181181
let node_name = parse_name(get_pair(&mut pairs, "name")?)?;
182182
let file_path_str = get_pair(&mut pairs, "file_path")?.as_str();
183-
let file_path: PathBuf = file_path_str
184-
.try_into()
185-
.map_err(|_| errors::ParserError::ParseError(format!("Invalid path: {file_path_str}")))?;
186-
183+
let file_path: PathBuf = file_path_str.into();
187184
let mut args: Option<String> = None;
188185
let mut cmp: Option<Comparison> = None;
189186
let mut timeout = None;

0 commit comments

Comments
 (0)