mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
chore: fix clippy warnings (#7476)
This commit is contained in:
parent
5248a711ff
commit
3da20d19a1
3 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue