diff options
| author | Ulf Lilleengen <[email protected]> | 2022-08-09 14:51:32 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-08-09 14:51:32 +0200 |
| commit | 87401c49b71eb22a4f1a9ce4b318ebd20ea38000 (patch) | |
| tree | ba3aa090ca446595fd041416d193299f9ff1eeb2 | |
| parent | 2e76b13a4c5fcf46b3a9fc58ceef91e9317c12b7 (diff) | |
Fix formatting
| -rw-r--r-- | embassy-net/src/tcp.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index 814e7ab63..2e276ecd3 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs | |||
| @@ -389,10 +389,7 @@ pub mod client { | |||
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnection<'d, N, TX_SZ, RX_SZ> { | 391 | impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpConnection<'d, N, TX_SZ, RX_SZ> { |
| 392 | fn new<D: Device>( | 392 | fn new<D: Device>(stack: &'d Stack<D>, state: &'d TcpClientState<N, TX_SZ, RX_SZ>) -> Result<Self, Error> { |
| 393 | stack: &'d Stack<D>, | ||
| 394 | state: &'d TcpClientState<N, TX_SZ, RX_SZ>, | ||
| 395 | ) -> Result<Self, Error> { | ||
| 396 | let mut bufs = state.pool.alloc().ok_or(Error::ConnectionReset)?; | 393 | let mut bufs = state.pool.alloc().ok_or(Error::ConnectionReset)?; |
| 397 | Ok(Self { | 394 | Ok(Self { |
| 398 | socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().0, &mut bufs.as_mut().1) }, | 395 | socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().0, &mut bufs.as_mut().1) }, |
| @@ -456,9 +453,7 @@ pub mod client { | |||
| 456 | 453 | ||
| 457 | impl<const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpClientState<N, TX_SZ, RX_SZ> { | 454 | impl<const N: usize, const TX_SZ: usize, const RX_SZ: usize> TcpClientState<N, TX_SZ, RX_SZ> { |
| 458 | pub const fn new() -> Self { | 455 | pub const fn new() -> Self { |
| 459 | Self { | 456 | Self { pool: Pool::new() } |
| 460 | pool: Pool::new() | ||
| 461 | } | ||
| 462 | } | 457 | } |
| 463 | } | 458 | } |
| 464 | 459 | ||
