Skip to content

Commit 6759d59

Browse files
committed
Change to precision
1 parent a3c4ed4 commit 6759d59

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/handlers/graphical.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ See [`set_hook()`](crate::set_hook) for more details on customizing your global
2323
printer.
2424
2525
The width with which reports get printed depends on the configured width value, but can also get overridden per call
26-
using the [Rust fmt width](https://doc.rust-lang.org/std/fmt/#width) specifier.
26+
using the [Rust fmt precision](https://doc.rust-lang.org/std/fmt/#precision) specifier.
2727
2828
```ignore
2929
let diagnostic = // ...
30-
println!("{diagnostic:300?}"); // Prints with 300 width instead of the configured value
30+
println!("{diagnostic:.300?}"); // Prints with 300 width instead of the configured value
3131
```
3232
*/
3333
#[derive(Debug, Clone)]
@@ -1374,7 +1374,7 @@ impl ReportHandler for GraphicalReportHandler {
13741374
return fmt::Debug::fmt(diagnostic, f);
13751375
}
13761376

1377-
if let Some(width) = f.width() {
1377+
if let Some(width) = f.precision() {
13781378
let mut handler = self.clone();
13791379
handler.termwidth = width;
13801380
handler.render_report(f, diagnostic)

0 commit comments

Comments
 (0)