Merge rust-bitcoin/rust-bitcoin#3918: Remove deprecated `std::error::Error` trait method impls
0719997fee
api: Run just check-api (Tobin C. Harding)1e503a8d3b
Remove deprecated std::error::Error trait method impls (Tobin C. Harding) Pull request description: The `description` method was deprecated in Rust `v1.42`. The `cause` method was deprecated in Rust `v1.33`. Our MSRV is now Rust `v1.63`. We do not need to implement the deprecated functions any longer. Fix: #3869 ACKs for top commit: apoelstra: ACK 0719997feef4ef8b2686e570d4083f88be9c5bb0; successfully ran local tests Tree-SHA512: e627f614ab8c36ce34109b8d8ef9216e9e802e6db286fa676eff3e6741da39f03cf6080cf47f7d6aa414c5acd790f94b389b219f18992cfcc8869b668e745152
This commit is contained in:
commit
b442d942bf
|
@ -239,8 +239,6 @@ pub fn bitcoin_io::Cursor<T>::inner(&self) -> &T
|
||||||
pub fn bitcoin_io::Cursor<T>::into_inner(self) -> T
|
pub fn bitcoin_io::Cursor<T>::into_inner(self) -> T
|
||||||
pub fn bitcoin_io::Cursor<T>::read(&mut self, buf: &mut [u8]) -> bitcoin_io::Result<usize>
|
pub fn bitcoin_io::Cursor<T>::read(&mut self, buf: &mut [u8]) -> bitcoin_io::Result<usize>
|
||||||
pub fn bitcoin_io::Cursor<T>::set_position(&mut self, position: u64)
|
pub fn bitcoin_io::Cursor<T>::set_position(&mut self, position: u64)
|
||||||
pub fn bitcoin_io::Error::cause(&self) -> core::option::Option<&dyn core::error::Error>
|
|
||||||
pub fn bitcoin_io::Error::description(&self) -> &str
|
|
||||||
pub fn bitcoin_io::Error::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
pub fn bitcoin_io::Error::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||||
pub fn bitcoin_io::Error::fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> core::result::Result<(), core::fmt::Error>
|
pub fn bitcoin_io::Error::fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> core::result::Result<(), core::fmt::Error>
|
||||||
pub fn bitcoin_io::Error::from(kind: bitcoin_io::ErrorKind) -> bitcoin_io::Error
|
pub fn bitcoin_io::Error::from(kind: bitcoin_io::ErrorKind) -> bitcoin_io::Error
|
||||||
|
|
|
@ -76,19 +76,6 @@ impl std::error::Error for Error {
|
||||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||||
self.error.as_ref().and_then(|e| e.as_ref().source())
|
self.error.as_ref().and_then(|e| e.as_ref().source())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
fn description(&self) -> &str {
|
|
||||||
match self.error.as_ref() {
|
|
||||||
Some(e) => e.description(),
|
|
||||||
None => self.kind.description(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
fn cause(&self) -> Option<&dyn std::error::Error> {
|
|
||||||
self.error.as_ref().and_then(|e| e.as_ref().cause())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
|
|
Loading…
Reference in New Issue