diff --git a/cli/diff.rs b/cli/diff.rs index cc516d94ce..50ba7c6337 100644 --- a/cli/diff.rs +++ b/cli/diff.rs @@ -106,7 +106,7 @@ pub fn diff(orig_text: &str, edit_text: &str) -> Result { let split = s.split('\n').enumerate(); for (i, s) in split { if i > 0 { - orig.push_str("\n"); + orig.push('\n'); } orig.push_str(&fmt_rem_text_highlight(s)); } @@ -116,7 +116,7 @@ pub fn diff(orig_text: &str, edit_text: &str) -> Result { let split = s.split('\n').enumerate(); for (i, s) in split { if i > 0 { - edit.push_str("\n"); + edit.push('\n'); } edit.push_str(&fmt_add_text_highlight(s)); } diff --git a/cli/http_cache.rs b/cli/http_cache.rs index 240d44adb6..b936d11e8d 100644 --- a/cli/http_cache.rs +++ b/cli/http_cache.rs @@ -58,7 +58,7 @@ pub fn url_to_filename(url: &Url) -> PathBuf { let mut rest_str = url.path().to_string(); if let Some(query) = url.query() { - rest_str.push_str("?"); + rest_str.push('?'); rest_str.push_str(query); } // NOTE: fragment is omitted on purpose - it's not taken into diff --git a/cli/main.rs b/cli/main.rs index 5f79464485..37d5edc580 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -664,7 +664,7 @@ pub fn main() { .format(|buf, record| { let mut target = record.target().to_string(); if let Some(line_no) = record.line() { - target.push_str(":"); + target.push(':'); target.push_str(&line_no.to_string()); } if record.level() >= Level::Info {