Remove deprecated Error::description impl
This commit is contained in:
parent
023fae1f65
commit
2d70623356
|
@ -120,12 +120,7 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
impl error::Error for Error {}
|
||||
|
||||
#[cfg(feature="bitcoinconsensus")]
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -128,12 +128,7 @@ impl fmt::Display for ParseOutPointError {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for ParseOutPointError {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
ParseOutPointError::Txid(ref e) => Some(e),
|
||||
|
|
|
@ -109,7 +109,6 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
|
@ -126,10 +125,6 @@ impl error::Error for Error {
|
|||
| Error::UnknownInventoryType(..) => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -60,11 +60,7 @@ impl From<io::Error> for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
|
|
|
@ -87,7 +87,6 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
|
@ -96,10 +95,6 @@ impl error::Error for Error {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -115,13 +115,7 @@ impl fmt::Display for ParseAmountError {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for ParseAmountError {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for ParseAmountError {}
|
||||
|
||||
fn is_too_precise(s: &str, precision: usize) -> bool {
|
||||
s.contains('.') || precision >= s.len() || s.chars().rev().take(precision).any(|d| d != '0')
|
||||
|
|
|
@ -52,12 +52,7 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
impl error::Error for Error {}
|
||||
|
||||
/// Vector-like object that holds the first 100 elements on the stack. If more space is needed it
|
||||
/// will be allocated on the heap.
|
||||
|
|
|
@ -75,12 +75,7 @@ pub enum Error {
|
|||
Io(io::Error),
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
impl error::Error for Error {}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
|
||||
|
|
|
@ -411,10 +411,6 @@ impl error::Error for Error {
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
impl From<secp256k1::Error> for Error {
|
||||
|
|
|
@ -71,7 +71,6 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
|
@ -80,10 +79,6 @@ impl error::Error for Error {
|
|||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
/// An element of a script template
|
||||
|
|
|
@ -52,10 +52,6 @@ impl error::Error for Error {
|
|||
Error::Secp256k1(ref e) => Some(e),
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -83,7 +83,6 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn cause(&self) -> Option<&dyn error::Error> {
|
||||
match *self {
|
||||
|
@ -92,10 +91,6 @@ impl error::Error for Error {
|
|||
Error::BlockBadProofOfWork | Error::BlockBadTarget => None
|
||||
}
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -69,9 +69,4 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
"description() is deprecated; use Display"
|
||||
}
|
||||
}
|
||||
impl error::Error for Error {}
|
||||
|
|
Loading…
Reference in New Issue