Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also run clippy on examples #666

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }} --examples --all -- -D warnings
sholderbach marked this conversation as resolved.
Show resolved Hide resolved


- 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