Fix comments on {read,write}_raw() functions

This commit is contained in:
Nic0w 2021-05-04 19:48:40 +02:00
parent 8d29464ee3
commit d9b1b2b1ec

View file

@ -247,7 +247,7 @@ impl<D: UARTDevice> UARTPeripheral<Enabled, D> {
/// This function writes as long as it can. As soon that the FIFO is full, if :
/// - 0 bytes were written, a WouldBlock Error is returned
/// - some bytes were written, it is deemed to be a success
/// Upon success, the number of written bytes is returned.
/// Upon success, the remaining slice is returned.
pub fn write_raw<'d>(&self, data: &'d [u8]) -> nb::Result<&'d [u8], Infallible> {
let mut bytes_written = 0;
@ -274,7 +274,7 @@ impl<D: UARTDevice> UARTPeripheral<Enabled, D> {
/// This function reads as long as it can. As soon that the FIFO is empty, if :
/// - 0 bytes were read, a WouldBlock Error is returned
/// - some bytes were read, it is deemed to be a success
/// Upon success, the number of read bytes is returned.
/// Upon success, the remaining slice is returned.
pub fn read_raw<'b>(&self, buffer: &'b mut [u8]) -> nb::Result<&'b mut [u8], ReadError<'b>> {
let mut bytes_read = 0;