Merge rust-bitcoin/rust-bitcoin#1887: Remove doc(hidden) from error conversion functions

042dcaa4b7 Remove doc(hidden) from error conversion functions (Tobin C. Harding)

Pull request description:

  Give people access to the error type conversion docs, its no harm and it may be useful when the compiler does not give enough information.

  Done based on discussion here: https://github.com/rust-bitcoin/rust-bitcoin/pull/1846#discussion_r1209583520

ACKs for top commit:
  Kixunil:
    ACK 042dcaa4b7
  apoelstra:
    ACK 042dcaa4b7

Tree-SHA512: 9d975845ba84213b203062282b68f06f6790d03dbc88d66dce82e9bedff4696fc01da6216920de9e9e4130f6469b32ff9c168d0800d057ec0bae51702d4a139e
This commit is contained in:
Andrew Poelstra 2023-05-30 16:33:38 +00:00
commit 6a04ca12e0
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
6 changed files with 0 additions and 9 deletions

View File

@ -148,12 +148,10 @@ impl std::error::Error for Error {
}
}
#[doc(hidden)]
impl From<base58::Error> for Error {
fn from(e: base58::Error) -> Error { Error::Base58(e) }
}
#[doc(hidden)]
impl From<bech32::Error> for Error {
fn from(e: bech32::Error) -> Error { Error::Bech32(e) }
}

View File

@ -779,7 +779,6 @@ impl From<UintError> for Error {
}
#[cfg(feature = "bitcoinconsensus")]
#[doc(hidden)]
impl From<bitcoinconsensus::Error> for Error {
fn from(err: bitcoinconsensus::Error) -> Error { Error::BitcoinConsensus(err) }
}

View File

@ -93,7 +93,6 @@ impl std::error::Error for Error {
}
}
#[doc(hidden)]
impl From<io::Error> for Error {
fn from(error: io::Error) -> Self { Error::Io(error) }
}

View File

@ -65,17 +65,14 @@ impl std::error::Error for Error {
}
}
#[doc(hidden)]
impl From<base58::Error> for Error {
fn from(e: base58::Error) -> Error { Error::Base58(e) }
}
#[doc(hidden)]
impl From<secp256k1::Error> for Error {
fn from(e: secp256k1::Error) -> Error { Error::Secp256k1(e) }
}
#[doc(hidden)]
impl From<hex::Error> for Error {
fn from(e: hex::Error) -> Self { Error::Hex(e) }
}

View File

@ -203,7 +203,6 @@ impl std::error::Error for Error {
}
}
#[doc(hidden)]
impl From<hashes::FromSliceError> for Error {
fn from(e: hashes::FromSliceError) -> Error { Error::HashParse(e) }
}

View File

@ -68,7 +68,6 @@ mod message_signing {
}
}
#[doc(hidden)]
impl From<secp256k1::Error> for MessageSignatureError {
fn from(e: secp256k1::Error) -> MessageSignatureError {
MessageSignatureError::InvalidEncoding(e)