1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-26 18:51:00 +02:00

Inline format vars to make the format str simpler (#551)

This commit is contained in:
Yuri Astrakhan
2023-04-06 06:00:10 -04:00
committed by GitHub
parent 86d8c4ae54
commit 5cdb73387f
5 changed files with 9 additions and 10 deletions

View File

@ -17,8 +17,8 @@ impl Error for ReadUsernameError {}
impl Display for ReadUsernameError {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Self::IoError(e) => write!(f, "IO error: {}", e),
Self::EmptyUsername(filename) => write!(f, "Found no username in {}", filename),
Self::IoError(e) => write!(f, "IO error: {e}"),
Self::EmptyUsername(filename) => write!(f, "Found no username in {filename}"),
}
}
}