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 newly added clippy warnings #9

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Commits on Feb 12, 2024

  1. Fix newly added clippy warnings

    ```
    warning: use of `or_insert_with` to construct default value
       --> lcov2cobertura/src/lib.rs:351:22
        |
    351 |                     .or_insert_with(Package::default)
        |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
        = note: `#[warn(clippy::unwrap_or_default)]` on by default
    
    warning: accessing first element with `args.files.get(0)`
      --> src/main.rs:68:15
       |
    68 |     } else if args.files.get(0) == Some(&PathBuf::from("-")) {
       |               ^^^^^^^^^^^^^^^^^ help: try: `args.files.first()`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
       = note: `#[warn(clippy::get_first)]` on by default
    
    warning: accessing first element with `args
                         .files.get(0)`
      --> src/main.rs:75:24
       |
    75 |           let filename = args
       |  ________________________^
    76 | |             .files
    77 | |             .get(0)
       | |___________________^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    help: try
       |
    75 ~         let filename = args
    76 +             .files.first()
       |
    ```
    taiki-e committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    0d7f8a1 View commit details
    Browse the repository at this point in the history