about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-08-08 14:43:27 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-08-08 14:58:52 +0000
commit95c1c34fff6675910986c93c3fea3c03e9810f6a (patch)
tree84010ffd97eeb6a452ecf3a36b8895a098da919b /compiler/rustc_errors/src/json.rs
parentae696f847dee523df6afed14468de70fc6479552 (diff)
downloadrust-95c1c34fff6675910986c93c3fea3c03e9810f6a.tar.gz
rust-95c1c34fff6675910986c93c3fea3c03e9810f6a.zip
review comments
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
-rw-r--r--compiler/rustc_errors/src/json.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs
index 02a0de201ed..32e59f9ab03 100644
--- a/compiler/rustc_errors/src/json.rs
+++ b/compiler/rustc_errors/src/json.rs
@@ -176,7 +176,7 @@ impl Emitter for JsonEmitter {
     }
 
     fn should_show_explain(&self) -> bool {
-        !matches!(self.json_rendered, HumanReadableErrorType::Short)
+        !self.json_rendered.short()
     }
 }
 
@@ -356,7 +356,7 @@ impl Diagnostic {
 
         let buf = BufWriter::default();
         let mut dst: Destination = Box::new(buf.clone());
-        let short = matches!(je.json_rendered, HumanReadableErrorType::Short);
+        let short = je.json_rendered.short();
         match je.color_config {
             ColorConfig::Always | ColorConfig::Auto => dst = Box::new(termcolor::Ansi::new(dst)),
             ColorConfig::Never => {}