mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
chore: upgrade to rust 1.58 (#13377)
This commit is contained in:
parent
903cb48fe9
commit
ad224f53c7
17 changed files with 29 additions and 46 deletions
|
@ -409,7 +409,7 @@ impl fmt::Display for Diagnostics {
|
|||
if i > 0 {
|
||||
write!(f, "\n\n")?;
|
||||
}
|
||||
write!(f, "{}", item.to_string())?;
|
||||
write!(f, "{}", item)?;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ where
|
|||
{
|
||||
let result = watch_future.await;
|
||||
if let Err(err) = result {
|
||||
let msg = format!("{}: {}", colors::red_bold("error"), err.to_string(),);
|
||||
let msg = format!("{}: {}", colors::red_bold("error"), err);
|
||||
eprintln!("{}", msg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ fn format_frame(frame: &JsStackFrame) -> String {
|
|||
if frame.is_promise_all {
|
||||
result += &italic_bold(&format!(
|
||||
"Promise.all (index {})",
|
||||
frame.promise_index.unwrap_or_default().to_string()
|
||||
frame.promise_index.unwrap_or_default()
|
||||
))
|
||||
.to_string();
|
||||
return result;
|
||||
|
|
|
@ -288,7 +288,7 @@ impl GraphData {
|
|||
if !range.specifier.as_str().contains("$deno") {
|
||||
return Some(Err(custom_error(
|
||||
get_error_class_name(&error.clone().into()),
|
||||
format!("{}\n at {}", error.to_string(), range),
|
||||
format!("{}\n at {}", error, range),
|
||||
)));
|
||||
}
|
||||
return Some(Err(error.clone().into()));
|
||||
|
@ -307,7 +307,7 @@ impl GraphData {
|
|||
if !range.specifier.as_str().contains("$deno") {
|
||||
return Some(Err(custom_error(
|
||||
get_error_class_name(&error.clone().into()),
|
||||
format!("{}\n at {}", error.to_string(), range),
|
||||
format!("{}\n at {}", error, range),
|
||||
)));
|
||||
}
|
||||
return Some(Err(error.clone().into()));
|
||||
|
@ -323,7 +323,7 @@ impl GraphData {
|
|||
if !range.specifier.as_str().contains("$deno") {
|
||||
return Some(Err(custom_error(
|
||||
get_error_class_name(&error.clone().into()),
|
||||
format!("{}\n at {}", error.to_string(), range),
|
||||
format!("{}\n at {}", error, range),
|
||||
)));
|
||||
}
|
||||
return Some(Err(error.clone().into()));
|
||||
|
|
|
@ -428,18 +428,10 @@ fn relative_specifier(
|
|||
}
|
||||
}
|
||||
if parts.is_empty() {
|
||||
format!(
|
||||
"./{}{}",
|
||||
last_a,
|
||||
specifier[Position::AfterPath..].to_string()
|
||||
)
|
||||
format!("./{}{}", last_a, &specifier[Position::AfterPath..])
|
||||
} else {
|
||||
parts.push(last_a);
|
||||
format!(
|
||||
"{}{}",
|
||||
parts.join("/"),
|
||||
specifier[Position::AfterPath..].to_string()
|
||||
)
|
||||
format!("{}{}", parts.join("/"), &specifier[Position::AfterPath..])
|
||||
}
|
||||
} else {
|
||||
specifier[Position::BeforePath..].into()
|
||||
|
|
|
@ -588,8 +588,8 @@ pub(crate) fn to_hover_text(
|
|||
"blob" => "_(a blob url)_".to_string(),
|
||||
_ => format!(
|
||||
"{}​{}",
|
||||
specifier[..url::Position::AfterScheme].to_string(),
|
||||
specifier[url::Position::AfterScheme..].to_string()
|
||||
&specifier[..url::Position::AfterScheme],
|
||||
&specifier[url::Position::AfterScheme..],
|
||||
)
|
||||
.replace('@', "​@"),
|
||||
},
|
||||
|
|
|
@ -342,11 +342,11 @@ fn resolve_shim_data(
|
|||
}
|
||||
|
||||
if let Some(inspect) = flags.inspect {
|
||||
executable_args.push(format!("--inspect={}", inspect.to_string()));
|
||||
executable_args.push(format!("--inspect={}", inspect));
|
||||
}
|
||||
|
||||
if let Some(inspect_brk) = flags.inspect_brk {
|
||||
executable_args.push(format!("--inspect-brk={}", inspect_brk.to_string()));
|
||||
executable_args.push(format!("--inspect-brk={}", inspect_brk));
|
||||
}
|
||||
|
||||
if let Some(import_map_path) = &flags.import_map_path {
|
||||
|
@ -989,12 +989,12 @@ mod tests {
|
|||
|
||||
let mut expected_string = format!(
|
||||
"--import-map '{}' 'http://localhost:4545/cat.ts'",
|
||||
import_map_url.to_string()
|
||||
import_map_url
|
||||
);
|
||||
if cfg!(windows) {
|
||||
expected_string = format!(
|
||||
"\"--import-map\" \"{}\" \"http://localhost:4545/cat.ts\"",
|
||||
import_map_url.to_string()
|
||||
import_map_url
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -267,11 +267,7 @@ impl PrettyTestReporter {
|
|||
print!("{}", " ".repeat(description.level));
|
||||
}
|
||||
|
||||
println!(
|
||||
"{} {}",
|
||||
status,
|
||||
colors::gray(human_elapsed(elapsed.into())).to_string()
|
||||
);
|
||||
println!("{} {}", status, colors::gray(human_elapsed(elapsed.into())));
|
||||
|
||||
if let Some(error_text) = result.error() {
|
||||
for line in error_text.lines() {
|
||||
|
@ -357,11 +353,7 @@ impl TestReporter for PrettyTestReporter {
|
|||
print!(" ");
|
||||
}
|
||||
|
||||
println!(
|
||||
"{} {}",
|
||||
status,
|
||||
colors::gray(human_elapsed(elapsed.into())).to_string()
|
||||
);
|
||||
println!("{} {}", status, colors::gray(human_elapsed(elapsed.into())));
|
||||
}
|
||||
|
||||
fn report_step_wait(&mut self, description: &TestStepDescription) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue