summaryrefslogtreecommitdiff
path: root/cli/tsc/diagnostics.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/tsc/diagnostics.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tsc/diagnostics.rs')
-rw-r--r--cli/tsc/diagnostics.rs8
1 files changed, 4 insertions, 4 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(())