Skip to content

Commit

Permalink
fix spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
john-cd committed Dec 24, 2023
1 parent be9e44c commit 4b9340d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/concerns/error_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ fn main() -> Result<(), Box<dyn Error>> {
The `#[error(...)]` messages support a shorthand for interpolating fields from the error.

```rust,editable,ignore
#[error("{var}")] ⟶ write!("{}", self.var)
#[error("{0}")] ⟶ write!("{}", self.0)
#[error("{var:?}")] ⟶ write!("{:?}", self.var)
#[error("{0:?}")] ⟶ write!("{:?}", self.0)
#[error("{var}")]write!("{}", self.var)
#[error("{0}")]write!("{}", self.0)
#[error("{var:?}")]write!("{:?}", self.var)
#[error("{0:?}")]write!("{:?}", self.0)
```

```rust,editable,ignore
Expand Down

0 comments on commit 4b9340d

Please sign in to comment.