Fix formatting

This commit is contained in:
Ulf Lilleengen 2022-08-09 14:51:32 +02:00
parent 2e76b13a4c
commit 87401c49b7

View File

@ -389,10 +389,7 @@ pub mod client {
} }
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnection<'d, N, TX_SZ, RX_SZ> { impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnection<'d, N, TX_SZ, RX_SZ> {
fn new<D: Device>( fn new<D: Device>(stack: &'d Stack<D>, state: &'d TcpClientState<N, TX_SZ, RX_SZ>) -> Result<Self, Error> {
stack: &'d Stack<D>,
state: &'d TcpClientState<N, TX_SZ, RX_SZ>,
) -> Result<Self, Error> {
let mut bufs = state.pool.alloc().ok_or(Error::ConnectionReset)?; let mut bufs = state.pool.alloc().ok_or(Error::ConnectionReset)?;
Ok(Self { Ok(Self {
socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().0, &mut bufs.as_mut().1) }, socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().0, &mut bufs.as_mut().1) },
@ -456,9 +453,7 @@ pub mod client {
impl<const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpClientState<N, TX_SZ, RX_SZ> { impl<const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpClientState<N, TX_SZ, RX_SZ> {
pub const fn new() -> Self { pub const fn new() -> Self {
Self { Self { pool: Pool::new() }
pool: Pool::new()
}
} }
} }