diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-27 10:43:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 10:43:16 -0500 |
commit | f5840bdcd360ec0bac2501f333e58e25742b1537 (patch) | |
tree | 7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/tsc | |
parent | 1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff) |
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/diagnostics.rs | 8 | ||||
-rw-r--r-- | cli/tsc/mod.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cli/tsc/diagnostics.rs b/cli/tsc/diagnostics.rs index ffb4a946d..461cda775 100644 --- a/cli/tsc/diagnostics.rs +++ b/cli/tsc/diagnostics.rs @@ -143,7 +143,7 @@ impl From<i64> for DiagnosticCategory { 1 => DiagnosticCategory::Error, 2 => DiagnosticCategory::Suggestion, 3 => DiagnosticCategory::Message, - _ => panic!("Unknown value: {}", value), + _ => panic!("Unknown value: {value}"), } } } @@ -212,7 +212,7 @@ impl Diagnostic { }; if !category.is_empty() { - write!(f, "{}[{}]: ", code, category) + write!(f, "{code}[{category}]: ") } else { Ok(()) } @@ -375,12 +375,12 @@ impl fmt::Display for Diagnostics { if i > 0 { write!(f, "\n\n")?; } - write!(f, "{}", item)?; + write!(f, "{item}")?; i += 1; } if i > 1 { - write!(f, "\n\nFound {} errors.", i)?; + write!(f, "\n\nFound {i} errors.")?; } Ok(()) diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 439a0de20..3e7fbfb15 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -98,7 +98,7 @@ pub fn get_types_declaration_file_text(unstable: bool) -> String { lib_names .into_iter() .map(|name| { - let asset_url = format!("asset:///lib.{}.d.ts", name); + let asset_url = format!("asset:///lib.{name}.d.ts"); assets.remove(&asset_url).unwrap() }) .collect::<Vec<_>>() @@ -204,7 +204,7 @@ impl fmt::Display for Stats { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { writeln!(f, "Compilation statistics:")?; for (key, value) in self.0.clone() { - writeln!(f, " {}: {}", key, value)?; + writeln!(f, " {key}: {value}")?; } Ok(()) @@ -838,7 +838,7 @@ pub fn exec(request: Request) -> Result<Response, AnyError> { "rootNames": root_names, }); let request_str = request_value.to_string(); - let exec_source = format!("globalThis.exec({})", request_str); + let exec_source = format!("globalThis.exec({request_str})"); runtime .execute_script(&located_script_name!(), startup_source) |