Skip to content

Commit 064850e

Browse files
committed
Remove unused mut, update docs
1 parent b40b75a commit 064850e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

nrf-hal-common/src/twis.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ where
202202
self.0.rxd.amount.read().bits()
203203
}
204204

205-
/// Checks if RX buffer overflow was detected, and prevented.
205+
/// Checks if RX buffer overflow was detected.
206206
#[inline(always)]
207207
pub fn is_overflow(&self) -> bool {
208208
self.0.errorsrc.read().overflow().bit()
@@ -214,7 +214,7 @@ where
214214
self.0.errorsrc.read().dnack().bit()
215215
}
216216

217-
/// Checks if TX buffer over-read was detected, and prevented.
217+
/// Checks if TX buffer over-read was detected and ORC was clocked out.
218218
#[inline(always)]
219219
pub fn is_overread(&self) -> bool {
220220
self.0.errorsrc.read().overread().bit()
@@ -397,8 +397,7 @@ where
397397

398398
/// Receives data into the given `buffer`. Buffer must be located in RAM.
399399
/// Returns a value that represents the in-progress DMA transfer.
400-
#[allow(unused_mut)]
401-
pub fn rx<W, B>(mut self, mut buffer: B) -> Result<Transfer<T, B>, Error>
400+
pub fn rx<W, B>(self, mut buffer: B) -> Result<Transfer<T, B>, Error>
402401
where
403402
B: WriteBuffer<Word = W> + 'static,
404403
{
@@ -425,8 +424,7 @@ where
425424

426425
/// Transmits data from the given `buffer`. Buffer must be located in RAM.
427426
/// Returns a value that represents the in-progress DMA transfer.
428-
#[allow(unused_mut)]
429-
pub fn tx<W, B>(mut self, buffer: B) -> Result<Transfer<T, B>, Error>
427+
pub fn tx<W, B>(self, buffer: B) -> Result<Transfer<T, B>, Error>
430428
where
431429
B: ReadBuffer<Word = W> + 'static,
432430
{

0 commit comments

Comments
 (0)