Skip to content

Commit

Permalink
replace actions-rs (#36)
Browse files Browse the repository at this point in the history
* actions-rs/toolchain -> dtolnay/rust-toolchain@nightly
* actions-rs/clippy-check -> actions-rs-plus/clippy-check
  • Loading branch information
Araxeus committed Feb 17, 2023
1 parent b673c6a commit 9bbdee2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
components: rustfmt, clippy
toolchain: stable
override: true

- uses: Swatinem/rust-cache@v2

Expand All @@ -34,11 +31,9 @@ jobs:

- name: Create Clippy output job
if: success() || failure() # run regardless of prior step
uses: actions-rs/clippy-check@v1
uses: actions-rs-plus/clippy-check@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -W clippy::pedantic -W clippy::cargo -W clippy::nursery -D warnings
name: Clippy Result

- name: Clippy check
run: cargo clippy
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@nightly

- uses: Swatinem/rust-cache@v2

Expand Down
4 changes: 2 additions & 2 deletions src/structs/prompt_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait Theme {

if highlight_matches {
if let Some((_score, indices)) = matcher.fuzzy_indices(text, search_term) {
for (idx, c) in text.chars().into_iter().enumerate() {
for (idx, c) in text.chars().enumerate() {
if indices.contains(&idx) {
write!(f, "{}", style(c).for_stderr().bold())?;
} else {
Expand Down Expand Up @@ -239,7 +239,7 @@ impl Theme for ColorfulTheme {

if highlight_matches {
if let Some((_score, indices)) = matcher.fuzzy_indices(text, search_term) {
for (idx, c) in text.chars().into_iter().enumerate() {
for (idx, c) in text.chars().enumerate() {
if text.starts_with('\u{1f5a5}') && c == ' ' && active {
continue; // fix `🖥️ ..` is printed as `🖥️ ..`
};
Expand Down

0 comments on commit 9bbdee2

Please sign in to comment.