1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-10 00:44:21 +02:00

anyhow: Remove ReadUsernameError::IoError

As far as I understand, the example with the `anyhow` example
does not use its special `IoError` anymore, unlike the previous
example with just `thiserror`.

I think this should be made clear. I considered just adding a
`// Now unused` comment, but I think ti's clearer to just remove
the unused code.
This commit is contained in:
Ilya Grigoriev 2022-12-23 13:32:03 -08:00 committed by GitHub
parent 0218fdb1f0
commit 894e694cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,6 @@ use anyhow::{Context, Result};
#[derive(Error, Debug)]
enum ReadUsernameError {
#[error("Could not read: {0}")]
IoError(#[from] io::Error),
#[error("Found no username in {0}")]
EmptyUsername(String),
}