rust-clippy
                                
                                 rust-clippy copied to clipboard
                                
                                    rust-clippy copied to clipboard
                            
                            
                            
                        A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
### Summary We have this function in our crate https://github.com/AFLplusplus/LibAFL/tree/main/libafl https://github.com/AFLplusplus/LibAFL/blob/main/libafl/src/observers/mod.rs#L816 ``` #[pyo3(name = "match_name")] #[allow(clippy::all)] fn pymatch_name(&self, name: &str) -> Option { for ob in &self.list { if *ob.name()...
Lint name: `future_not_send` I tried this code: ```rust async fn recv_msg { let len = reader.read_u16().await? as usize; buf.resize_with(len, u8::default); let bytes_read = reader.read_exact(buf).await?; debug_assert_eq!(bytes_read, len); Ok(buf) } ``` I...
This is a minimal and hacky implementation right now, but it should get the idea across. A large number of suggestions in clippy are basically extracting a snippet of an...
### What it does I would like clippy to lint against *all* integer casts. So I have set: ```rust #: ```rust fn parse_fields Result where V: Value + Mutable +...
### Summary If I add ```rust use anyhow::Result; ``` and use `Result` only in my tests, clippy thinks this import is unused. ### Lint Name unused_imports ### Reproducer This is...
### Summary blacklisted_name should toralate use of such name as `foo`. As far as I see the source code, it tries to allow `foo` in tests, but it doesn't. Similar...
### What it does This lint suggests using the feature added in the 1.58 version of Rust: implicit named arguments for formatting macros. ### Lint Name implicit_named_arguments ### Category style...
### Summary ```rust fn v1(a: bool, b: bool) { if a { if b { todo!() } } } fn v2(a: bool, b: bool) { if a { // comment...