Skip to content

Commit 71fa123

Browse files
authored
Merge pull request #95 from Dirbaio/remove-bound
Remove unneeded `where Self: 'a` bound in `TcpClient::connect`.
2 parents 65ba5a3 + 43448d1 commit 71fa123

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343
strategy:
4444
matrix:
45-
rust: [nightly-2022-11-22]
45+
rust: [nightly-2023-11-01]
4646
TARGET:
4747
[x86_64-unknown-linux-gnu, thumbv6m-none-eabi, thumbv7m-none-eabi]
4848

.github/workflows/rustfmt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [ staging, trying, master ]
3+
branches: [staging, trying, master]
44
pull_request:
55

66
name: Code formatting check
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: dtolnay/rust-toolchain@master
2525
with:
26-
toolchain: nightly-2022-11-22
26+
toolchain: nightly-2023-11-01
2727
components: rustfmt
2828
- run: cargo fmt --all -- --check
2929
working-directory: embedded-nal-async

embedded-nal-async/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## [Unreleased]
99

1010
- [breaking] `Dns::get_host_by_address` now uses `&mut [u8]` instead of `heapless::String`.
11+
- [breaking] Remove unneeded `where Self: 'a` bound in `TcpClient::connect`.
1112

1213
## [0.6.0] - 2023-10-03
1314

embedded-nal-async/src/stack/tcp.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@ pub trait TcpConnect {
1717
/// Connect to the given remote host and port.
1818
///
1919
/// Returns `Ok` if the connection was successful.
20-
async fn connect<'a>(&'a self, remote: SocketAddr) -> Result<Self::Connection<'a>, Self::Error>
21-
// This bound is required due to an AFIT limitaton: https://github.com/rust-lang/rust/issues/104908
22-
where
23-
Self: 'a;
20+
async fn connect<'a>(&'a self, remote: SocketAddr)
21+
-> Result<Self::Connection<'a>, Self::Error>;
2422
}
2523

2624
impl<T: TcpConnect> TcpConnect for &T {
2725
type Error = T::Error;
2826

2927
type Connection<'a> = T::Connection<'a> where Self: 'a;
3028

31-
async fn connect<'a>(&'a self, remote: SocketAddr) -> Result<Self::Connection<'a>, Self::Error>
32-
where
33-
Self: 'a,
34-
{
29+
async fn connect<'a>(
30+
&'a self,
31+
remote: SocketAddr,
32+
) -> Result<Self::Connection<'a>, Self::Error> {
3533
T::connect(self, remote).await
3634
}
3735
}

0 commit comments

Comments
 (0)