aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-03-11 01:07:06 +0100
committerDario Nieuwenhuis <[email protected]>2022-04-06 05:38:11 +0200
commit5c0db627feae071182dd9978ffb56b0524558d93 (patch)
treeaebf176534654b84aa5153f23c6c29f6b1ea6f14
parent9a6d11281d33ec687e68b9b28d8489150bafff89 (diff)
nrf/usb: update where clause syntax.
-rw-r--r--embassy-nrf/src/usb.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/embassy-nrf/src/usb.rs b/embassy-nrf/src/usb.rs
index 874bfe841..5df5053ac 100644
--- a/embassy-nrf/src/usb.rs
+++ b/embassy-nrf/src/usb.rs
@@ -214,10 +214,7 @@ pub struct Bus<'d, T: Instance> {
214} 214}
215 215
216impl<'d, T: Instance> driver::Bus for Bus<'d, T> { 216impl<'d, T: Instance> driver::Bus for Bus<'d, T> {
217 type PollFuture<'a> 217 type PollFuture<'a> = impl Future<Output = Event> + 'a where Self: 'a;
218 where
219 Self: 'a,
220 = impl Future<Output = Event> + 'a;
221 218
222 fn poll<'a>(&'a mut self) -> Self::PollFuture<'a> { 219 fn poll<'a>(&'a mut self) -> Self::PollFuture<'a> {
223 poll_fn(|cx| { 220 poll_fn(|cx| {
@@ -348,10 +345,7 @@ impl<'d, T: Instance, Dir> driver::Endpoint for Endpoint<'d, T, Dir> {
348} 345}
349 346
350impl<'d, T: Instance> driver::EndpointOut for Endpoint<'d, T, Out> { 347impl<'d, T: Instance> driver::EndpointOut for Endpoint<'d, T, Out> {
351 type ReadFuture<'a> 348 type ReadFuture<'a> = impl Future<Output = Result<usize, ReadError>> + 'a where Self: 'a;
352 where
353 Self: 'a,
354 = impl Future<Output = Result<usize, ReadError>> + 'a;
355 349
356 fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> { 350 fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> {
357 async move { 351 async move {
@@ -448,10 +442,7 @@ impl<'d, T: Instance> driver::EndpointOut for Endpoint<'d, T, Out> {
448} 442}
449 443
450impl<'d, T: Instance> driver::EndpointIn for Endpoint<'d, T, In> { 444impl<'d, T: Instance> driver::EndpointIn for Endpoint<'d, T, In> {
451 type WriteFuture<'a> 445 type WriteFuture<'a> = impl Future<Output = Result<(), WriteError>> + 'a where Self: 'a;
452 where
453 Self: 'a,
454 = impl Future<Output = Result<(), WriteError>> + 'a;
455 446
456 fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> { 447 fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> {
457 async move { 448 async move {