From 2721f979ea6cdfa0b892bd748c56976dcaa32b81 Mon Sep 17 00:00:00 2001 From: Alexandre Senges Date: Mon, 14 Aug 2023 16:44:36 +0200 Subject: [PATCH] Move thiserror::error It is slightly confusing to import a symbol called `Error` twice --- src/error-handling/dynamic-errors.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/error-handling/dynamic-errors.md b/src/error-handling/dynamic-errors.md index dd5b0ae0..f3a05b04 100644 --- a/src/error-handling/dynamic-errors.md +++ b/src/error-handling/dynamic-errors.md @@ -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);