mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-09-13 21:11:29 +00:00
another two clippy warnings
This commit is contained in:
parent
a4ae97f6b2
commit
945ec91484
|
@ -3,7 +3,7 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::io::{BufRead, BufReader, Read};
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
use glob::glob;
|
||||
|
|
|
@ -16,7 +16,7 @@ mod fsutil;
|
|||
mod language;
|
||||
mod stats;
|
||||
|
||||
use std::io::{BufRead, Read};
|
||||
use std::io::Read;
|
||||
use std::fs::File;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
@ -176,7 +176,7 @@ fn main() {
|
|||
|
||||
languages.par_iter_mut()
|
||||
.for_each(|&mut (name, ref mut language)| {
|
||||
if language.files.len() == 0 {
|
||||
if language.files.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -215,9 +215,8 @@ fn main() {
|
|||
if !language.multi_line.is_empty() {
|
||||
let multi_line = language.multi_line;
|
||||
let multi_line_end = language.multi_line_end;
|
||||
if line.starts_with(multi_line) {
|
||||
is_in_comments = true;
|
||||
} else if contains_comments(line, multi_line, multi_line_end) {
|
||||
if line.starts_with(multi_line) ||
|
||||
contains_comments(line, multi_line, multi_line_end) {
|
||||
is_in_comments = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue