aboutsummaryrefslogtreecommitdiff
path: root/core/src/utils/decode.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-11-28 22:41:33 +0300
committerhozan23 <hozan23@proton.me>2023-11-28 22:41:33 +0300
commit98a1de91a2dae06323558422c239e5a45fc86e7b (patch)
tree38c640248824fcb3b4ca5ba12df47c13ef26ccda /core/src/utils/decode.rs
parentca2a5f8bbb6983d9555abd10eaaf86950b794957 (diff)
implement TLS for inbound and outbound connections
Diffstat (limited to 'core/src/utils/decode.rs')
-rw-r--r--core/src/utils/decode.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/core/src/utils/decode.rs b/core/src/utils/decode.rs
deleted file mode 100644
index a8a6522..0000000
--- a/core/src/utils/decode.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-use bincode::Decode;
-
-use crate::Result;
-
-/// Decodes a given type `T` from the given slice. returns the decoded value
-/// along with the number of bytes read.
-pub fn decode<T: Decode>(src: &[u8]) -> Result<(T, usize)> {
- let (result, bytes_read) = bincode::decode_from_slice(src, bincode::config::standard())?;
- Ok((result, bytes_read))
-}