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

Fix clippy lints in docs #365

Merged
merged 2 commits into from Apr 13, 2024
Merged

Fix clippy lints in docs #365

merged 2 commits into from Apr 13, 2024

Conversation

willbush
Copy link
Contributor

@willbush willbush commented Apr 13, 2024

One example:

dape-tester on ξ‚  main [!+?] is πŸ“¦ v0.1.0 via πŸ¦€ v1.79.0-nightly via ❄️  impure (nix-shell-env)
❯ cargo clippy --all-targets
warning: unused imports: `IntoDiagnostic`, `WrapErr`
 --> src/my_internal_file3.rs:1:22
  |
1 | use miette::{miette, IntoDiagnostic, Result, WrapErr};
  |                      ^^^^^^^^^^^^^^          ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: question mark operator is useless here
 --> src/my_internal_file3.rs:6:5
  |
6 | /     Ok(version
7 | |         .parse()
8 | |         .map_err(|_| miette!("Invalid version {}", version))?)
  | |______________________________________________________________^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
  = note: `#[warn(clippy::needless_question_mark)]` on by default
help: try removing question mark and `Ok()`
  |
6 ~     version
7 +         .parse()
8 +         .map_err(|_| miette!("Invalid version {}", version))
  |

warning: `dape-tester` (bin "dape-tester") generated 2 warnings (run `cargo clippy --fix --bin "dape-tester"` to apply 2 suggestions)
warning: `dape-tester` (bin "dape-tester" test) generated 2 warnings (2 duplicates)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s

dape-tester on ξ‚  main [!+?] is πŸ“¦ v0.1.0 via πŸ¦€ v1.79.0-nightly via ❄️  impure (nix-shell-env

Image of above text:

20240412_22h39m37s_grim

Also deleted a commented out unwrap found in lib.rs that's not found in the readme.

@zkat zkat merged commit ea4296d into zkat:main Apr 13, 2024
15 checks passed
@zkat
Copy link
Owner

zkat commented Apr 13, 2024

Thanks!

@willbush willbush deleted the docs/fix-clippy-lints branch April 13, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants