diff options
| author | Ulf Lilleengen <[email protected]> | 2021-08-02 12:42:06 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2021-08-02 12:42:06 +0200 |
| commit | f2c2ad06caa0b05c4c8a9b3b88741afe5ab9f836 (patch) | |
| tree | 1a26a2a753b9c65b18669d384ab929d2f2c5baab | |
| parent | 4d8d8e386f9e85a6273cf93f1c8feb5871ed96af (diff) | |
Use lifetime to ensure only a single future is created at a time
| -rw-r--r-- | embassy/src/util/mpsc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy/src/util/mpsc.rs b/embassy/src/util/mpsc.rs index 4c6e8a6f0..4a934eb2f 100644 --- a/embassy/src/util/mpsc.rs +++ b/embassy/src/util/mpsc.rs | |||
| @@ -156,7 +156,7 @@ where | |||
| 156 | /// closed by `recv` until they are all consumed. | 156 | /// closed by `recv` until they are all consumed. |
| 157 | /// | 157 | /// |
| 158 | /// [`close`]: Self::close | 158 | /// [`close`]: Self::close |
| 159 | pub fn recv(&mut self) -> RecvFuture<'ch, M, T, N> { | 159 | pub fn recv<'m>(&'m mut self) -> RecvFuture<'m, M, T, N> { |
| 160 | RecvFuture { | 160 | RecvFuture { |
| 161 | channel_cell: self.channel_cell, | 161 | channel_cell: self.channel_cell, |
| 162 | } | 162 | } |
