do not use deprecated description
This commit is contained in:
parent
56a6679ccb
commit
91f0453be6
@ -23,9 +23,12 @@ pub enum UserLibError {
|
|||||||
impl Display for UserLibError {
|
impl Display for UserLibError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::NotFound => write!(f, "{}", self.to_string()),
|
Self::NotFound => write!(f, "not found"),
|
||||||
Self::ParseError => write!(f, "{}", self.to_string()),
|
Self::ParseError => write!(f, "failed to parse"),
|
||||||
Self::FilesChanged => write!(f, "{}", self.to_string()),
|
Self::FilesChanged => write!(
|
||||||
|
f,
|
||||||
|
"The files changed. Updating could lead to conflict aborting."
|
||||||
|
),
|
||||||
Self::Message(message) => write!(f, "{}", message),
|
Self::Message(message) => write!(f, "{}", message),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,12 +36,7 @@ impl Display for UserLibError {
|
|||||||
|
|
||||||
impl Error for UserLibError {
|
impl Error for UserLibError {
|
||||||
fn description(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
match self {
|
todo!()
|
||||||
Self::NotFound => "not found",
|
|
||||||
Self::ParseError => "failed to parse",
|
|
||||||
Self::FilesChanged => "The files changed. Updating could lead to conflict aborting.",
|
|
||||||
Self::Message(message) => message,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user