Use Clippy on test code too (#22)

This commit is contained in:
daxpedda
2021-10-05 15:19:20 -07:00
committed by GitHub
parent a3db6cd9d2
commit 2d8780476a
5 changed files with 25 additions and 41 deletions
+3 -3
View File
@@ -85,7 +85,7 @@ fn parse_params(input: &str) -> String {
// If line contains =, then
if line.contains('=') {
// Clear out any existing string and flush to params
if param.len() > 0 {
if !param.is_empty() {
param += "\"";
params.push(param);
}
@@ -97,11 +97,11 @@ fn parse_params(input: &str) -> String {
param = format!(" \"{}\": \"{}", key, val);
} else {
let s = line.trim().to_string();
if s.contains("~") || s.contains("#") {
if s.contains('~') || s.contains('#') {
// Ignore comment lines
continue;
}
if s.len() > 0 {
if !s.is_empty() {
param += &s;
}
}