diff options
| author | Raul Alimbekov <[email protected]> | 2025-12-16 09:05:22 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-16 09:05:22 +0300 |
| commit | c9a04b4b732b7a3b696eb8223664c1a7942b1875 (patch) | |
| tree | 6dbe5c02e66eed8d8762f13f95afd24f8db2b38c /embassy-nrf/src/util.rs | |
| parent | cde24a3ef1117653ba5ed4184102b33f745782fb (diff) | |
| parent | 5ae6e060ec1c90561719aabdc29d5b6e7b8b0a82 (diff) | |
Merge branch 'main' into main
Diffstat (limited to 'embassy-nrf/src/util.rs')
| -rw-r--r-- | embassy-nrf/src/util.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embassy-nrf/src/util.rs b/embassy-nrf/src/util.rs index 78f71719f..87118d347 100644 --- a/embassy-nrf/src/util.rs +++ b/embassy-nrf/src/util.rs | |||
| @@ -15,9 +15,5 @@ pub(crate) fn slice_in_ram<T>(slice: *const [T]) -> bool { | |||
| 15 | 15 | ||
| 16 | /// Return an error if slice is not in RAM. Skips check if slice is zero-length. | 16 | /// Return an error if slice is not in RAM. Skips check if slice is zero-length. |
| 17 | pub(crate) fn slice_in_ram_or<T, E>(slice: *const [T], err: E) -> Result<(), E> { | 17 | pub(crate) fn slice_in_ram_or<T, E>(slice: *const [T], err: E) -> Result<(), E> { |
| 18 | if slice_in_ram(slice) { | 18 | if slice_in_ram(slice) { Ok(()) } else { Err(err) } |
| 19 | Ok(()) | ||
| 20 | } else { | ||
| 21 | Err(err) | ||
| 22 | } | ||
| 23 | } | 19 | } |
