notecrumbs

a nostr opengraph server build on nostrdb and egui
git clone git://jb55.com/notecrumbs
Log | Files | Refs | README | LICENSE

commit eda44cdc9319d07abe89974825f382deaf616829
parent f4d2ae7b31a815e16d4ec607aae5d475fc2d1dc9
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 17 Dec 2023 13:23:24 -0800

error: simplify StdError derivation

Diffstat:
Msrc/error.rs | 13+------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/error.rs b/src/error.rs @@ -1,6 +1,5 @@ use nostr_sdk::nips::nip19; use std::array::TryFromSliceError; -use std::error::Error as StdError; use std::fmt; #[derive(Debug)] @@ -47,14 +46,4 @@ impl fmt::Display for Error { } } -// Implementing `StdError` -impl StdError for Error { - fn source(&self) -> Option<&(dyn StdError + 'static)> { - match self { - Error::Nip19(e) => Some(e), - Error::Http(e) => Some(e), - Error::Nostrdb(e) => Some(e), - Error::SliceErr => None, - } - } -} +impl std::error::Error for Error {}