Skip to content

Fix Clippy warnings and errors #724

Open
@casey

Description

@casey

Running cargo clippy produces many (> 550) warnings and errors. These should be fixed, or, on a case-by-case basis, lints can be disabled. Additionally, clippy should probably run as part of CI, failing builds if new warnings or errors occur. Some of the warnings are style issues, but some indicate bugs. For example:

error: non-binding let on a synchronization lock
    --> lightning/src/ln/channelmanager.rs:3662:3
     |
3662 |         let _ = self.total_consistency_lock.write().unwrap();
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |

Unlike other bindings, let _ = ... immediately drops the right-hand side of the binding, which is almost certainly not what is intended.

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