chore: fix cargo clippy (#174)

This commit is contained in:
sigoden
2023-02-19 12:24:42 +08:00
committed by GitHub
parent fea9bf988a
commit 47883376c1
5 changed files with 26 additions and 32 deletions

View File

@@ -72,7 +72,7 @@ impl FromStr for LogHttp {
let mut elements = vec![];
let mut is_var = false;
let mut cache = String::new();
for c in format!("{} ", s).chars() {
for c in format!("{s} ").chars() {
if c == '$' {
if !cache.is_empty() {
elements.push(LogElement::Literal(cache.to_string()));