diff options
| author | Peter Krull <[email protected]> | 2024-03-03 15:43:01 +0100 |
|---|---|---|
| committer | Peter Krull <[email protected]> | 2024-03-03 15:43:01 +0100 |
| commit | 245e7d3bc20d66fa77f6763ce5e5bec0ea6ddeff (patch) | |
| tree | 5bbdbe72f7614cace3f1b2c9555ab2a9bb9aa1d7 /embassy-sync/src | |
| parent | 4bbcc2a7fbf1a363719d224dd80dfbcbbee6f26e (diff) | |
This one is for ci/rustfmt
Diffstat (limited to 'embassy-sync/src')
| -rw-r--r-- | embassy-sync/src/once_lock.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/embassy-sync/src/once_lock.rs b/embassy-sync/src/once_lock.rs index f83577a6d..31cc99711 100644 --- a/embassy-sync/src/once_lock.rs +++ b/embassy-sync/src/once_lock.rs | |||
| @@ -33,7 +33,7 @@ use core::task::Poll; | |||
| 33 | /// // Wait for the value to be initialized | 33 | /// // Wait for the value to be initialized |
| 34 | /// // and get a static reference it | 34 | /// // and get a static reference it |
| 35 | /// assert_eq!(VALUE.get().await, &20); | 35 | /// assert_eq!(VALUE.get().await, &20); |
| 36 | /// | 36 | /// |
| 37 | /// }; | 37 | /// }; |
| 38 | /// block_on(f) | 38 | /// block_on(f) |
| 39 | /// ``` | 39 | /// ``` |
| @@ -56,7 +56,6 @@ impl<T> OnceLock<T> { | |||
| 56 | /// Get a reference to the underlying value, waiting for it to be set. | 56 | /// Get a reference to the underlying value, waiting for it to be set. |
| 57 | /// If the value is already set, this will return immediately. | 57 | /// If the value is already set, this will return immediately. |
| 58 | pub async fn get(&self) -> &T { | 58 | pub async fn get(&self) -> &T { |
| 59 | |||
| 60 | poll_fn(|cx| match self.try_get() { | 59 | poll_fn(|cx| match self.try_get() { |
| 61 | Some(data) => Poll::Ready(data), | 60 | Some(data) => Poll::Ready(data), |
| 62 | None => { | 61 | None => { |
