Skip to content

Commit

Permalink
Update Rust toolchain and fix new clippy issues (#64)
Browse files Browse the repository at this point in the history
warning: single-character string constant used as pattern.
  • Loading branch information
rnestler authored May 16, 2022
1 parent cacd7b1 commit 057290a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ env:
jobs:
build_and_test:
runs-on: ubuntu-20.04
container: rnestler/archlinux-rust:1.58.0
container: rnestler/archlinux-rust:1.60.0
steps:
- uses: actions/checkout@v2
- run: cargo build
- run: cargo test

lint:
runs-on: ubuntu-20.04
container: rnestler/archlinux-rust:1.58.0
container: rnestler/archlinux-rust:1.60.0
steps:
- uses: actions/checkout@v2
- run: rustup component add clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

fmt:
runs-on: ubuntu-20.04
container: rnestler/archlinux-rust:1.58.0
container: rnestler/archlinux-rust:1.60.0
steps:
- uses: actions/checkout@v2
- run: rustup component add rustfmt
- run: cargo fmt -- --check

audit:
runs-on: ubuntu-20.04
container: rnestler/archlinux-rust:1.58.0
container: rnestler/archlinux-rust:1.60.0
steps:
- uses: actions/checkout@v2
- run: pacman --noconfirm -Sy cargo-audit
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl PackageInfo {
}
version += remaining;

Some(version.replace("-", "."))
Some(version.replace('-', "."))
}

/// Return a string representing the "time ago" when this package was
Expand Down Expand Up @@ -99,12 +99,12 @@ impl KernelInfo {
// if the last part is text it is a kernel variant
if last_part.chars().all(char::is_alphabetic) {
Some(KernelInfo {
version: uname_output[0..last_dash].replace("-", "."),
version: uname_output[0..last_dash].replace('-', "."),
variant: Some(last_part.to_string()),
})
} else {
Some(KernelInfo {
version: uname_output.replace("-", "."),
version: uname_output.replace('-', "."),
variant: None,
})
}
Expand Down

0 comments on commit 057290a

Please sign in to comment.