Skip to content

OCD: clippy issues #3018

Open
Open
@nyurik

Description

@nyurik

Here's the statistics of the Clippy issues to see which may need to be fixed. I excluded bindgen-integration and tests_expectations as they seem to have some other issues.

echo '|count|lint|' && echo '|---|---|' && \
   cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations --message-format=json --quiet -- -W clippy::pedantic \
    | jq -r '.message.code.code | select(. != null and startswith("clippy::")) | "| [" + . + "](https://rust-lang.github.io/rust-clippy/master/index.html#" + .[8:] + ") |"' \
    | sort | uniq -c | sort -h -r | sed 's/^/|/' 
count lint fixes
271 clippy::doc_markdown #3026
226 clippy::return_self_not_must_use
183 clippy::unreadable_literal
156 clippy::must_use_candidate
54 clippy::too_many_lines
47 clippy::default_trait_access
46 clippy::manual_let_else #3019
44 clippy::trivially_copy_pass_by_ref
40 clippy::needless_pass_by_value
40 clippy::match_same_arms
40 clippy::ignored_unit_patterns
34 clippy::redundant_closure_for_method_calls
34 clippy::cast_possible_truncation
33 clippy::single_match_else #3019
32 clippy::explicit_iter_loop #3020
28 clippy::cast_lossless #3021
26 clippy::items_after_statements
26 clippy::cast_sign_loss
24 clippy::used_underscore_binding
20 clippy::wildcard_imports
17 clippy::if_not_else #3022
16 clippy::map_unwrap_or #3023
16 clippy::implicit_hasher
12 clippy::unused_self
12 clippy::missing_errors_doc
11 clippy::unnested_or_patterns
10 clippy::unnecessary_wraps
10 clippy::struct_excessive_bools
10 clippy::module_name_repetitions
10 clippy::cast_possible_wrap
9 clippy::missing_panics_doc
6 clippy::ptr_as_ptr
6 clippy::case_sensitive_file_extension_comparisons
4 clippy::struct_field_names
4 clippy::redundant_else
3 clippy::manual_string_new
3 clippy::enum_glob_use
2 clippy::similar_names
2 clippy::range_plus_one
2 clippy::maybe_infinite_iter
2 clippy::match_wildcard_for_single_variants
2 clippy::match_bool
2 clippy::manual_instant_elapsed
2 clippy::inconsistent_struct_constructor
2 clippy::flat_map_option
2 clippy::explicit_into_iter_loop
2 clippy::checked_conversions
2 clippy::cast_precision_loss
2 clippy::borrow_as_ptr
1 clippy::should_panic_without_expect
1 clippy::manual_assert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions