bitcoin: Remove error module

The `error` module is empty except for public re-exports. We are still
in the "break everything and get the API right" stage so this module
adds no value - remove it.
This commit is contained in:
Tobin C. Harding 2024-05-15 08:10:58 +10:00
parent a5b93cb159
commit 98bf213c52
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
4 changed files with 2 additions and 13 deletions

View File

@ -120,7 +120,7 @@ pub enum ParseOutPointError {
/// Error in TXID part. /// Error in TXID part.
Txid(hex::HexToArrayError), Txid(hex::HexToArrayError),
/// Error in vout part. /// Error in vout part.
Vout(crate::error::ParseIntError), Vout(parse::ParseIntError),
/// Error in general format. /// Error in general format.
Format, Format,
/// Size exceeds max. /// Size exceeds max.

View File

@ -1,9 +0,0 @@
// SPDX-License-Identifier: CC0-1.0
//! Contains error types and other error handling tools.
#[rustfmt::skip] // Keep public re-exports separate.
#[doc(inline)]
pub use units::parse::{
ContainsPrefixError, MissingPrefixError, ParseIntError, PrefixedHexError, UnprefixedHexError,
};

View File

@ -100,7 +100,6 @@ pub mod blockdata;
pub mod consensus; pub mod consensus;
// Private until we either make this a crate or flatten it - still to be decided. // Private until we either make this a crate or flatten it - still to be decided.
pub(crate) mod crypto; pub(crate) mod crypto;
pub mod error;
pub mod hash_types; pub mod hash_types;
pub mod merkle_tree; pub mod merkle_tree;
pub mod network; pub mod network;

View File

@ -12,13 +12,12 @@ use core::ops::{Add, Div, Mul, Not, Rem, Shl, Shr, Sub};
use io::{BufRead, Write}; use io::{BufRead, Write};
#[cfg(all(test, mutate))] #[cfg(all(test, mutate))]
use mutagen::mutate; use mutagen::mutate;
use units::parse; use units::parse::{self, ParseIntError, PrefixedHexError, UnprefixedHexError};
use crate::block::Header; use crate::block::Header;
use crate::blockdata::block::BlockHash; use crate::blockdata::block::BlockHash;
use crate::consensus::encode::{self, Decodable, Encodable}; use crate::consensus::encode::{self, Decodable, Encodable};
use crate::consensus::Params; use crate::consensus::Params;
use crate::error::{ParseIntError, PrefixedHexError, UnprefixedHexError};
/// Implement traits and methods shared by `Target` and `Work`. /// Implement traits and methods shared by `Target` and `Work`.
macro_rules! do_impl { macro_rules! do_impl {