Skip to content

Commit 92aa33b

Browse files
committed
Remove some unncessary bounds from futures::spi traits
1 parent bac1603 commit 92aa33b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/futures/spi.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use core::{future::Future, mem::MaybeUninit};
44

55
/// Async read + write
6-
pub trait ReadWrite<Word: 'static> {
6+
pub trait ReadWrite<Word> {
77
/// Error type
88
type Error;
99

@@ -18,7 +18,7 @@ pub trait ReadWrite<Word: 'static> {
1818
}
1919

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

@@ -33,7 +33,7 @@ pub trait ReadWriteInPlace<Word: 'static> {
3333
}
3434

3535
/// Async write
36-
pub trait Write<W> {
36+
pub trait Write<Word> {
3737
/// Error type
3838
type Error;
3939

@@ -43,11 +43,11 @@ pub trait Write<W> {
4343
Self: 'a;
4444

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

4949
/// Async read
50-
pub trait Read<W> {
50+
pub trait Read<Word> {
5151
/// Error type
5252
type Error;
5353

@@ -59,5 +59,5 @@ pub trait Read<W> {
5959
/// Reads words from the slave without specifying any data to write.
6060
/// The SPI hardware will send data, though what data it sends is not defined
6161
/// by this trait. Some hardware can configure what values (e.g. all zeroes, all ones), some cannot.
62-
fn read<'a>(&'a mut self, words: &'a mut [MaybeUninit<W>]) -> Self::ReadFuture<'a>;
62+
fn read<'a>(&'a mut self, words: &'a mut [MaybeUninit<Word>]) -> Self::ReadFuture<'a>;
6363
}

0 commit comments

Comments
 (0)