split into workspace so CLI can be a standalone crate

This commit is contained in:
2024-07-15 10:34:51 -04:00
parent 27c2f467c4
commit 55801384eb
12 changed files with 259 additions and 148 deletions

View File

@@ -36,7 +36,7 @@ pub trait ShowError<T, E>
fn error_print_prefix(self, prefix: &str);
}
impl<T, E> ShowError<T, E> for Result<T, E>
impl<T, E> ShowError<T, E> for Result<T, E>
where E: std::fmt::Display
{
fn error_popup(self, title: &str) {
@@ -91,7 +91,7 @@ impl<E: Error> Serialize for SerializeUpstream<E> {
}
}
fn serialize_upstream_err<E, M>(err: &E, map: &mut M) -> Result<(), M::Error>
fn serialize_upstream_err<E, M>(err: &E, map: &mut M) -> Result<(), M::Error>
where
E: Error,
M: serde::ser::SerializeMap,
@@ -370,7 +370,7 @@ pub enum RequestError {
#[error("Error response from server: {0}")]
Server(ServerError),
#[error("Unexpected response from server")]
Unexpected(crate::srv::Response),
Unexpected(crate::srv::CliResponse),
#[error("The server did not respond with valid JSON")]
InvalidJson(#[from] serde_json::Error),
#[error("Error reading/writing stream: {0}")]