Skip to content

Commit 9d6ccdf

Browse files
committed
Return error code making most sense
1 parent d2eacea commit 9d6ccdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ where
260260
// This is overly restrictive. See (similar SPIM issue):
261261
// https://github.com/nrf-rs/nrf52/issues/17
262262
if rx_buffer.len() > u8::max_value() as usize {
263-
return Err(Error::TxBufferTooLong);
263+
return Err(Error::RxBufferTooLong);
264264
}
265265

266266
// NOTE: RAM slice check is not necessary, as a mutable slice can only be

0 commit comments

Comments
 (0)