diff options
| author | zirkonya <zirkonya@iridium.lan> | 2026-09-01 10:10:23 +0200 |
|---|---|---|
| committer | zirkonya <zirkonya@iridium.lan> | 2026-09-01 10:10:23 +0200 |
| commit | ad95589a8a01ec1ca1ff8826d457691f94da6770 (patch) | |
| tree | ddfcffe92bd73f63d73f3eecd9c81634c2814077 | |
| parent | b0ef89ef808e7d34c179a15dd5e213d78cf5bb1f (diff) | |
rust cargo fmt
| -rw-r--r-- | src/codec/decode.rs | 2 | ||||
| -rw-r--r-- | src/codec/encode.rs | 12 | ||||
| -rw-r--r-- | src/context.rs | 2 | ||||
| -rw-r--r-- | src/transport/receiver.rs | 2 | ||||
| -rw-r--r-- | src/transport/sender.rs | 2 | ||||
| -rw-r--r-- | src/types/prefix/count.rs | 7 |
6 files changed, 16 insertions, 11 deletions
diff --git a/src/codec/decode.rs b/src/codec/decode.rs index d068760..47e8dad 100644 --- a/src/codec/decode.rs +++ b/src/codec/decode.rs @@ -4,7 +4,7 @@ use std::{ sync::Arc, }; -use crate::{codec::error::Result, codec::error::CodecError, context::Context}; +use crate::{codec::error::CodecError, codec::error::Result, context::Context}; macro_rules! impl_decode { ($t:ty) => { diff --git a/src/codec/encode.rs b/src/codec/encode.rs index 735aa70..7a65bb5 100644 --- a/src/codec/encode.rs +++ b/src/codec/encode.rs @@ -10,7 +10,11 @@ macro_rules! impl_encode { Ok(std::mem::size_of::<$t>()) } - fn encode_slice(slice: &[Self], buffer: &mut Vec<u8>, _: &Context<Data>) -> Result<usize> + fn encode_slice( + slice: &[Self], + buffer: &mut Vec<u8>, + _: &Context<Data>, + ) -> Result<usize> where Self: Sized, { @@ -22,7 +26,11 @@ macro_rules! impl_encode { Ok(len) } - fn encode_iter<'a, I>(iter: I, buffer: &mut Vec<u8>, ctx: &Context<Data>) -> Result<usize> + fn encode_iter<'a, I>( + iter: I, + buffer: &mut Vec<u8>, + ctx: &Context<Data>, + ) -> Result<usize> where Self: 'a + Sized, I: IntoIterator<Item = &'a Self>, diff --git a/src/context.rs b/src/context.rs index bcc0b6d..0c42c23 100644 --- a/src/context.rs +++ b/src/context.rs @@ -6,4 +6,4 @@ impl<Data> Context<Data> { pub fn new(data: Data) -> Self { Self { data } } -}
\ No newline at end of file +} diff --git a/src/transport/receiver.rs b/src/transport/receiver.rs index a165110..6f00f87 100644 --- a/src/transport/receiver.rs +++ b/src/transport/receiver.rs @@ -15,4 +15,4 @@ impl<Data, Uid: PartialEq, R: PacketReceiverBuf<Data, Uid>> PacketReceiver<Data, let packet = P::decode(&mut reader, ctx)?; Ok((uid, packet)) } -}
\ No newline at end of file +} diff --git a/src/transport/sender.rs b/src/transport/sender.rs index 3c83c6e..16afb22 100644 --- a/src/transport/sender.rs +++ b/src/transport/sender.rs @@ -14,4 +14,4 @@ impl<Data, S: PacketSenderBuf<Data>> PacketSender<Data> for S { packet.encode(&mut buf, ctx)?; self.send_buf(&buf) } -}
\ No newline at end of file +} diff --git a/src/types/prefix/count.rs b/src/types/prefix/count.rs index 04bc7c6..f8ac68d 100644 --- a/src/types/prefix/count.rs +++ b/src/types/prefix/count.rs @@ -90,10 +90,7 @@ where L: Codec<Data> + Size, D: IntoIterator<Item = I> + FromIterator<I>, { - fn decode( - buf: &mut &[u8], - ctx: &Context<Data>, - ) -> crate::codec::error::Result<Self> + fn decode(buf: &mut &[u8], ctx: &Context<Data>) -> crate::codec::error::Result<Self> where Self: Sized, { @@ -108,4 +105,4 @@ where _len: PhantomData, }) } -}
\ No newline at end of file +} |
