Conversation
| Some(ref value) => match fs { | ||
| Some(f) => Some(f(value)), | ||
| None => None, | ||
| }, |
Check warning
Code scanning / clippy
manual implementation of `Option::map`
| let v = (f)(&self[i]); | ||
| result.push(v) | ||
| } | ||
| return result; |
Check warning
Code scanning / clippy
unneeded `return` statement
| let mut n1: (bool, char) = (first.is_lowercase(), first); | ||
|
|
||
| for c in text { | ||
| let prev_n1 = n1.clone(); |
Check warning
Code scanning / clippy
using `clone` on type `(bool, char)` which implements the `Copy` trait
| fn name(&self) -> String; | ||
|
|
||
| fn slug(&self) -> String { | ||
| self.name().to_lowercase().replace(" ", "-") |
Check warning
Code scanning / clippy
single-character string constant used as pattern
| pub fn file_to_vec(fp: String) -> Result<Vec<String>, io::Error> { | ||
| let file_in = File::open(fp)?; | ||
| let file_reader = BufReader::new(file_in); | ||
| Ok(file_reader.lines().filter_map(Result::ok).collect()) |
Check warning
Code scanning / clippy
`filter_map()` will run forever if the iterator repeatedly produces an `Err`
| let mut n1: (bool, char) = (first.is_lowercase(), first); | ||
|
|
||
| for c in text { | ||
| let prev_n1 = n1.clone(); |
Check warning
Code scanning / clippy
using `clone` on type `(bool, char)` which implements the `Copy` trait
| .find(|attr| attr.path().is_ident("display")) | ||
| .is_some() |
Check warning
Code scanning / clippy
called `is_some()` after searching an `Iterator` with `find`
No description provided.