Remove dependency bincode

This commit is contained in:
Dominik Werder
2022-11-22 13:27:06 +01:00
parent 06e21bc21f
commit 8d205a7fa7
7 changed files with 295 additions and 207 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -142,7 +142,7 @@ pub async fn get_binned(
}
},
Err(e) => {
error!("len {} bincode error {:?}", n1, e);
error!("len {} {:?}", n1, e);
Some(Err(e.into()))
}
}

View File

@@ -216,7 +216,7 @@ where
}
},
Err(e) => {
error!("bincode error: {:?}", e);
error!("{:?}", e);
Some(Err(e.into()))
}
}

View File

@@ -187,7 +187,7 @@ where
}
},
Err(e) => {
error!("bincode error: {:?}", e);
error!("{:?}", e);
Some(Err(e.into()))
}
}

View File

@@ -15,4 +15,3 @@ async-channel = "1.6"
chrono = { version = "0.4", features = ["serde"] }
url = "2.2"
regex = "1.5"
bincode = "1.3"

View File

@@ -305,36 +305,6 @@ impl From<std::str::Utf8Error> for Error {
}
}
/*
impl<T: fmt::Debug> From<nom::Err<T>> for Error {
fn from(k: nom::Err<T>) -> Self {
Self::with_msg(format!("nom::Err<T> {:?}", k))
}
}
impl<I> nom::error::ParseError<I> for Error {
fn from_error_kind(_input: I, kind: nom::error::ErrorKind) -> Self {
Self::with_msg(format!("ParseError {:?}", kind))
}
fn append(_input: I, kind: nom::error::ErrorKind, other: Self) -> Self {
Self::with_msg(format!("ParseError kind {:?} other {:?}", kind, other))
}
}
impl From<JoinError> for Error {
fn from(k: JoinError) -> Self {
Self::with_msg(format!("JoinError {:?}", k))
}
}
*/
impl From<Box<bincode::ErrorKind>> for Error {
fn from(k: Box<bincode::ErrorKind>) -> Self {
Self::with_msg(k.to_string())
}
}
impl From<serde_cbor::Error> for Error {
fn from(k: serde_cbor::Error) -> Self {
Self::with_msg(k.to_string())

View File

@@ -29,6 +29,7 @@ where
{
// TODO should be able to ask for data-events only, instead of mixed data and status events.
let inps = open_tcp_streams::<_, items_2::channelevents::ChannelEvents>(&query, cluster).await?;
//let inps = open_tcp_streams::<_, Box<dyn items_2::Events>>(&query, cluster).await?;
// TODO propagate also the max-buf-len for the first stage event reader:
#[cfg(NOTHING)]
let stream = {