Fix clippy warnings
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
This commit is contained in:
parent
3fe4dd2dda
commit
8bfd84539e
24 changed files with 68 additions and 79 deletions
|
@ -796,7 +796,7 @@ themePicker.onblur = handleThemeButtonsBlur;
|
|||
if path.exists() {
|
||||
for line in BufReader::new(File::open(path)?).lines() {
|
||||
let line = line?;
|
||||
if !line.starts_with("\"") {
|
||||
if !line.starts_with('"') {
|
||||
continue;
|
||||
}
|
||||
if line.starts_with(&format!("\"{}\"", krate)) {
|
||||
|
@ -810,8 +810,7 @@ themePicker.onblur = handleThemeButtonsBlur;
|
|||
}
|
||||
krates.push(
|
||||
line.split('"')
|
||||
.filter(|s| !s.is_empty())
|
||||
.next()
|
||||
.find(|s| !s.is_empty())
|
||||
.map(|s| s.to_owned())
|
||||
.unwrap_or_else(String::new),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue