Skip to content

Commit 9088cad

Browse files
committed
Remove std::error::Error::description() from error
It’s now advised to implement fmt::Display instead.
1 parent aeb84f9 commit 9088cad

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ extern crate unicode_bidi;
77
extern crate unicode_normalization;
88

99
use std::borrow::Cow;
10-
use std::error;
1110
use std::fmt;
1211
use unicode_normalization::UnicodeNormalization;
1312

@@ -36,11 +35,7 @@ impl fmt::Display for Error {
3635
}
3736
}
3837

39-
impl error::Error for Error {
40-
fn description(&self) -> &str {
41-
"error performing stringprep algorithm"
42-
}
43-
}
38+
impl std::error::Error for Error {}
4439

4540
/// Prepares a string with the SASLprep profile of the stringprep algorithm.
4641
///

0 commit comments

Comments
 (0)