1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

chore: fix clippy warnings (#7476)

This commit is contained in:
Bert Belder 2020-09-15 00:05:17 +02:00
parent 5248a711ff
commit 3da20d19a1
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
3 changed files with 4 additions and 4 deletions

View file

@ -106,7 +106,7 @@ pub fn diff(orig_text: &str, edit_text: &str) -> Result<String, fmt::Error> {
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<String, fmt::Error> {
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));
}

View file

@ -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

View file

@ -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 {