Skip to content

Commit 65cdbfc

Browse files
committed
upgrade bincode to 2.0
1 parent 924d227 commit 65cdbfc

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ default-features = false
5757
# # DEBUG patch.
5858
# [patch.crates-io]
5959
# chamomile = { git = "https://github.com/postsilicondev/chamomile" }
60-
# chamomile_types = { git = "https://github.com/postsilicondev/chamomile" }
60+
# chamomile_types = { git = "https://github.com/postsilicondev/chamomile" }

tdn/src/config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,6 @@ impl Config {
167167
}
168168
}
169169

170-
#[derive(Serialize, Deserialize, Debug)]
171-
pub struct RawUpper {
172-
addr: SocketAddr,
173-
group_id: String,
174-
}
175-
176170
/// parse raw file content to Config.
177171
#[derive(Serialize, Deserialize, Debug)]
178172
pub struct RawConfig {

types/src/rpc.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ impl From<std::io::Error> for RpcError {
3131
}
3232
}
3333

34-
impl From<bincode::Error> for RpcError {
35-
fn from(e: bincode::Error) -> RpcError {
34+
impl From<bincode::error::DecodeError> for RpcError {
35+
fn from(e: bincode::error::DecodeError) -> RpcError {
36+
RpcError::Custom(format!("{}", e))
37+
}
38+
}
39+
40+
impl From<bincode::error::EncodeError> for RpcError {
41+
fn from(e: bincode::error::EncodeError) -> RpcError {
3642
RpcError::Custom(format!("{}", e))
3743
}
3844
}

0 commit comments

Comments
 (0)