Need to do loop elements.
This commit is contained in:
@@ -58,33 +58,23 @@ impl error::Error for RenderError<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for WalkError<'_> {
|
||||
impl fmt::Display for WalkError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
WalkError::CantWalk { segment, elem } => {
|
||||
write!(f, "Tried to walk to {} from {:?}", segment, elem)
|
||||
}
|
||||
WalkError::NotFound { path, breadcrumbs } => {
|
||||
write!(f, "Could not find {:?} in {:?}", path, breadcrumbs)
|
||||
}
|
||||
WalkError::CantWalk => write!(f, "Failed to walk"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for WalkError<'_> {
|
||||
impl fmt::Debug for WalkError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
WalkError::CantWalk { segment, elem } => {
|
||||
write!(f, "Tried to walk to {} from {:?}", segment, elem)
|
||||
}
|
||||
WalkError::NotFound { path, breadcrumbs } => {
|
||||
write!(f, "Could not find {:?} in {:?}", path, breadcrumbs)
|
||||
}
|
||||
WalkError::CantWalk => write!(f, "Failed to walk"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for WalkError<'_> {
|
||||
impl error::Error for WalkError {
|
||||
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user