mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
refactor(error): remove deprecated description()
This commit is contained in:
17
src/error.rs
17
src/error.rs
@@ -1,4 +1,7 @@
|
||||
use std::fmt;
|
||||
use std::{
|
||||
fmt::{Display, Formatter, Result},
|
||||
error::Error,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ScootalooError {
|
||||
@@ -13,15 +16,11 @@ impl ScootalooError {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ScootalooError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl Error for ScootalooError {}
|
||||
|
||||
impl Display for ScootalooError {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
write!(f, "{}", self.details)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for ScootalooError {
|
||||
fn description(&self) -> &str {
|
||||
&self.details
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user