summaryrefslogtreecommitdiff
path: root/crates/utils/tcp_connection
diff options
context:
space:
mode:
Diffstat (limited to 'crates/utils/tcp_connection')
-rw-r--r--crates/utils/tcp_connection/src/error.rs3
-rw-r--r--crates/utils/tcp_connection/tcp_connection_test/src/test_msgpack.rs11
2 files changed, 4 insertions, 10 deletions
diff --git a/crates/utils/tcp_connection/src/error.rs b/crates/utils/tcp_connection/src/error.rs
index 691e5ee..28e33d3 100644
--- a/crates/utils/tcp_connection/src/error.rs
+++ b/crates/utils/tcp_connection/src/error.rs
@@ -41,6 +41,9 @@ pub enum TcpTargetError {
#[error("Not remote machine: {0}")]
NotRemote(String),
+
+ #[error("Not found: {0}")]
+ NotFound(String),
}
impl From<io::Error> for TcpTargetError {
diff --git a/crates/utils/tcp_connection/tcp_connection_test/src/test_msgpack.rs b/crates/utils/tcp_connection/tcp_connection_test/src/test_msgpack.rs
index 7a7dc1f..4c9c870 100644
--- a/crates/utils/tcp_connection/tcp_connection_test/src/test_msgpack.rs
+++ b/crates/utils/tcp_connection/tcp_connection_test/src/test_msgpack.rs
@@ -9,21 +9,12 @@ use crate::test_utils::{
target_configure::ServerTargetConfig,
};
-#[derive(Debug, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize, Default)]
struct TestData {
id: u32,
name: String,
}
-impl Default for TestData {
- fn default() -> Self {
- Self {
- id: 0,
- name: String::new(),
- }
- }
-}
-
pub(crate) struct MsgPackClientHandle;
impl ClientHandle<MsgPackServerHandle> for MsgPackClientHandle {