Use fmt shorthand in tests

This commit is contained in:
David Tolnay 2019-10-09 10:23:33 -07:00
parent 95cd9864d6
commit f7e48a99b3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
1 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ use std::fmt::Display;
use thiserror::Error;
#[derive(Error, Debug)]
#[error("braced error: {}", msg)]
#[error("braced error: {msg}")]
struct BracedError {
msg: String,
}
@ -14,7 +14,7 @@ struct BracedUnused {
}
#[derive(Error, Debug)]
#[error("tuple error: {}", .0)]
#[error("tuple error: {0}")]
struct TupleError(usize);
#[derive(Error, Debug)]
@ -23,9 +23,9 @@ struct UnitError;
#[derive(Error, Debug)]
enum EnumError {
#[error("braced error: {}", .id)]
#[error("braced error: {id}")]
Braced { id: usize, },
#[error("tuple error: {}", .0)]
#[error("tuple error: {0}")]
Tuple(usize),
#[error("unit error")]
Unit,