Delete ErrorDisplay, use anyhow instead!

This commit is contained in:
Lucien Greathouse
2021-01-18 14:54:12 -07:00
parent 27af0c841b
commit 4992c36f08
3 changed files with 1 additions and 21 deletions

View File

@@ -9,7 +9,6 @@ use memofs::{IoResultExt, Vfs, VfsEvent};
use rbx_dom_weak::{RbxId, RbxValue};
use crate::{
error::ErrorDisplay,
message_queue::MessageQueue,
snapshot::{
apply_patch_set, compute_patch_set, AppliedPatchSet, InstigatingSource, PatchSet, RojoTree,
@@ -313,7 +312,7 @@ fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: RbxId) -> Optio
apply_patch_set(tree, patch_set)
}
Err(err) => {
log::error!("Error processing filesystem change: {}", ErrorDisplay(err));
log::error!("Error processing filesystem change: {:?}", err);
return None;
}
},

View File

@@ -1,18 +0,0 @@
use std::{error::Error, fmt};
/// Wrapper type to print errors with source-chasing.
pub struct ErrorDisplay<E>(pub E);
impl<E: Error> fmt::Display for ErrorDisplay<E> {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
writeln!(formatter, "{}", self.0)?;
let mut current_err: &dyn Error = &self.0;
while let Some(source) = current_err.source() {
writeln!(formatter, " caused by {}", source)?;
current_err = &*source;
}
Ok(())
}
}

View File

@@ -9,7 +9,6 @@ mod tree_view;
mod auth_cookie;
mod change_processor;
mod error;
mod glob;
mod lua_ast;
mod message_queue;