Skip to content

Commit

Permalink
Also run clippy on examples (#666)
Browse files Browse the repository at this point in the history
* Also run clippy on examples

This PR also fixes existing clippy lints

* Update .github/workflows/ci.yml

---------

Co-authored-by: Stefan Holderbach <[email protected]>
  • Loading branch information
Hofer-Julian and sholderbach authored Nov 14, 2023
1 parent d9e0a32 commit 63c43a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy ${{ matrix.flags }} --all -- -D warnings
run: cargo clippy ${{ matrix.flags }} --all-targets --all -- -D warnings


- name: Tests
Expand Down
4 changes: 2 additions & 2 deletions examples/cwd_aware_hinter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ fn main() -> io::Result<()> {
let home_dir = std::env::home_dir().unwrap();

let history = create_filled_example_history(
&home_dir.to_string_lossy().to_string(),
&orig_dir.to_string_lossy().to_string(),
home_dir.to_string_lossy().as_ref(),
orig_dir.to_string_lossy().as_ref(),
);

let mut line_editor = Reedline::create()
Expand Down
2 changes: 1 addition & 1 deletion examples/transient_prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct CustomValidator;

impl Validator for CustomValidator {
fn validate(&self, line: &str) -> ValidationResult {
if line.ends_with("\\") {
if line.ends_with('\\') {
ValidationResult::Incomplete
} else {
ValidationResult::Complete
Expand Down

0 comments on commit 63c43a9

Please sign in to comment.