Skip to content

Commit 4050f1a

Browse files
bors[bot]kalkyl
andauthored
Merge #330
330: Fix SPIS Transfer is_done() mistake r=kalkyl a=kalkyl Noticed there was a mistake in the `Transfer` impl of `is_done()` where it would `take()` `inner` instead of `as_mut()`. Co-authored-by: Henrik Alsér <[email protected]> Co-authored-by: Henrik Alsér <[email protected]>
2 parents 6955467 + 6390762 commit 4050f1a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
### Fixes
66

77
- Fix TWIS transfer `is_done()` always returns true ([#329]).
8+
- Fix mistake in SPIS `Transfer` `is_done` to borrow `inner` ([#330]).
89

910
[#329]: https://github.com/nrf-rs/nrf-hal/pull/329
11+
[#330]: https://github.com/nrf-rs/nrf-hal/pull/330
1012

1113
## [0.12.2]
1214

nrf-hal-common/src/spis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl<T: Instance, B> Transfer<T, B> {
439439
pub fn is_done(&mut self) -> bool {
440440
let inner = self
441441
.inner
442-
.take()
442+
.as_mut()
443443
.unwrap_or_else(|| unsafe { core::hint::unreachable_unchecked() });
444444
inner.spis.is_done()
445445
}

0 commit comments

Comments
 (0)