mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +03:00
Also run clippy on examples (#666)
* Also run clippy on examples This PR also fixes existing clippy lints * Update .github/workflows/ci.yml --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
parent
d9e0a326df
commit
63c43a9a6b
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user