From c8b5f1e454d5cb2bd7580bbe0ac4fa83237e9f41 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 26 Aug 2020 18:20:22 +0200 Subject: Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195) --- cli/errors.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cli/errors.rs') diff --git a/cli/errors.rs b/cli/errors.rs index 6b53ac8d0..2d7bb1cd6 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -228,9 +228,3 @@ pub fn get_error_class(e: &ErrBox) -> &'static str { panic!("ErrBox '{}' contains boxed error of unknown type", e); }) } - -pub fn rust_err_to_json(error: &ErrBox) -> Box<[u8]> { - let error_value = - json!({ "kind": get_error_class(error), "message": error.to_string()}); - serde_json::to_vec(&error_value).unwrap().into_boxed_slice() -} -- cgit v1.2.3