From 2235dd795d3cc6c24ff1bdd1bbdcd110b4b0bdfc Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 24 Aug 2019 13:20:48 -0700 Subject: Revert json ops (#2814) * Revert "port more ops to JSON (#2809)" This reverts commit 137f33733d365026903d40e7cde6e34ac6c36dcf. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit 79f82cf10ed1dbf91346994250d7311a4d74377a. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit 5b2baa5c990fbeae747e952c5dcd7a5369e950b1. --- cli/deno_error.rs | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'cli/deno_error.rs') diff --git a/cli/deno_error.rs b/cli/deno_error.rs index 3b7dbcde8..e024a396c 100644 --- a/cli/deno_error.rs +++ b/cli/deno_error.rs @@ -205,18 +205,6 @@ impl GetErrorKind for ReadlineError { } } -impl GetErrorKind for serde_json::error::Error { - fn kind(&self) -> ErrorKind { - use serde_json::error::*; - match self.classify() { - Category::Io => ErrorKind::InvalidInput, - Category::Syntax => ErrorKind::InvalidInput, - Category::Data => ErrorKind::InvalidData, - Category::Eof => ErrorKind::UnexpectedEof, - } - } -} - #[cfg(unix)] mod unix { use super::{ErrorKind, GetErrorKind}; @@ -263,11 +251,6 @@ impl GetErrorKind for dyn AnyError { .or_else(|| self.downcast_ref::().map(Get::kind)) .or_else(|| self.downcast_ref::().map(Get::kind)) .or_else(|| self.downcast_ref::().map(Get::kind)) - .or_else(|| { - self - .downcast_ref::() - .map(Get::kind) - }) .or_else(|| unix_error_kind(self)) .unwrap_or_else(|| { panic!("Can't get ErrorKind for {:?}", self); -- cgit v1.2.3