From f8de7954b24fa8f020ce2e82e2579f406f8c3eda Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 1 Mar 2024 17:12:52 +1100 Subject: [PATCH] Remove unused pow::TryFromError type --- bitcoin/src/pow.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/bitcoin/src/pow.rs b/bitcoin/src/pow.rs index e6870677..c8c1eea6 100644 --- a/bitcoin/src/pow.rs +++ b/bitcoin/src/pow.rs @@ -723,22 +723,6 @@ impl> From for U256 { fn from(x: T) -> Self { U256(0, x.into()) } } -/// Error from `TryFrom` implementations, occurs when input is negative. -#[derive(Debug, Clone, PartialEq, Eq)] -#[non_exhaustive] -pub struct TryFromError(i128); - -impl fmt::Display for TryFromError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "attempt to create unsigned integer type from negative number: {}", self.0) - } -} - -#[cfg(feature = "std")] -impl std::error::Error for TryFromError { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { None } -} - impl Add for U256 { type Output = Self; fn add(self, rhs: Self) -> Self {