Skip to content

Commit 306b187

Browse files
committed
Remove MaybeUninit from futures::spi
1 parent a61008b commit 306b187

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/futures/spi.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Serial Peripheral Interface
22
3-
use core::{future::Future, mem::MaybeUninit};
3+
use core::future::Future;
44

55
/// Async transfer
6-
pub trait Transfer<Word: 'static> {
6+
pub trait Transfer<W: 'static> {
77
/// Error type
88
type Error;
99

@@ -14,11 +14,11 @@ pub trait Transfer<Word: 'static> {
1414

1515
/// Writes `words` to the slave from the `write` buffer. Puts the words returned in the `read` buffer.
1616
/// This method uses separate `write` and `read` buffers.
17-
fn transfer<'a>(&'a mut self, write: &'a [Word], read: &'a mut [MaybeUninit<Word>]) -> Self::TransferFuture<'a>;
17+
fn transfer<'a>(&'a mut self, write: &'a [W], read: &'a mut [W]) -> Self::TransferFuture<'a>;
1818
}
1919

2020
/// Async transfer in place.
21-
pub trait TransferInPlace<Word: 'static> {
21+
pub trait TransferInPlace<W: 'static> {
2222
/// Error type
2323
type Error;
2424

@@ -31,11 +31,11 @@ pub trait TransferInPlace<Word: 'static> {
3131
/// This method uses a single `readwrite` buffer.
3232
///
3333
/// The returned buffer is the initialized `readwrite` buffer.
34-
fn transfer_inplace<'a>(&'a mut self, readwrite: &'a mut [Word]) -> Self::TransferInPlaceFuture<'a>;
34+
fn transfer_inplace<'a>(&'a mut self, readwrite: &'a mut [W]) -> Self::TransferInPlaceFuture<'a>;
3535
}
3636

3737
/// Async write
38-
pub trait Write<Word> {
38+
pub trait Write<W> {
3939
/// Error type
4040
type Error;
4141

@@ -45,11 +45,11 @@ pub trait Write<Word> {
4545
Self: 'a;
4646

4747
/// Writes `words` to the slave, ignoring all the incoming words
48-
fn write<'a>(&'a mut self, words: &'a [Word]) -> Self::WriteFuture<'a>;
48+
fn write<'a>(&'a mut self, words: &'a [W]) -> Self::WriteFuture<'a>;
4949
}
5050

5151
/// Async read
52-
pub trait Read<Word: 'static> {
52+
pub trait Read<W: 'static> {
5353
/// Error type
5454
type Error;
5555

@@ -63,5 +63,5 @@ pub trait Read<Word: 'static> {
6363
/// by this trait. Some hardware can configure what values (e.g. 0x00, 0xFF), some cannot.
6464
///
6565
/// The returned buffer is the initialized `words` buffer.
66-
fn read<'a>(&'a mut self, words: &'a mut [MaybeUninit<Word>]) -> Self::ReadFuture<'a>;
66+
fn read<'a>(&'a mut self, words: &'a mut [W]) -> Self::ReadFuture<'a>;
6767
}

0 commit comments

Comments
 (0)