Skip to content

Commit 4f5c8f6

Browse files
committed
u8 as default Serial Word
1 parent 63dc712 commit 4f5c8f6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Changed
1111

12-
- Use `u8` as default SPI Word type
12+
- Use `u8` as default SPI as Serial Word type
1313

1414
### Added
1515
- Added `Can` Controller Area Network traits.

src/serial/blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! Implementing that marker trait will opt in your type into a blanket implementation.
66
77
/// Write half of a serial interface (blocking variant)
8-
pub trait Write<Word> {
8+
pub trait Write<Word = u8> {
99
/// The type of error that can occur when writing
1010
type Error: crate::serial::Error;
1111

src/serial/nb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
///
55
/// Some serial interfaces support different data sizes (8 bits, 9 bits, etc.);
66
/// This can be encoded in this trait via the `Word` type parameter.
7-
pub trait Read<Word> {
7+
pub trait Read<Word = u8> {
88
/// Read error
99
type Error: crate::serial::Error;
1010

@@ -21,7 +21,7 @@ impl<T: Read<Word>, Word> Read<Word> for &mut T {
2121
}
2222

2323
/// Write half of a serial interface
24-
pub trait Write<Word> {
24+
pub trait Write<Word = u8> {
2525
/// Write error
2626
type Error: crate::serial::Error;
2727

0 commit comments

Comments
 (0)