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

Move thiserror::error

It is slightly confusing to import a symbol called `Error` twice
This commit is contained in:
Alexandre Senges 2023-08-14 16:44:36 +02:00 committed by GitHub
parent f38b8a1972
commit 2721f979ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,10 +6,9 @@ all the different possibilities. `std::error::Error` makes this easy.
```rust,editable,compile_fail
use std::fs;
use std::io::Read;
use thiserror::Error;
use std::error::Error;
#[derive(Clone, Debug, Eq, Error, PartialEq)]
#[derive(Clone, Debug, Eq, thiserror::Error, PartialEq)]
#[error("Found no username in {0}")]
struct EmptyUsernameError(String);