Skip to content

Commit 697c4c3

Browse files
Dirbaioeldruin
andauthored
Apply suggestions from code review
Co-authored-by: Diego Barrios Romero <[email protected]>
1 parent 6b0b7dc commit 697c4c3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

embedded-hal-bus/src/i2c/critical_section.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct CriticalSectionDevice<'a, T> {
1414
}
1515

1616
impl<'a, T> CriticalSectionDevice<'a, T> {
17-
/// Create a new Mutexdevice
17+
/// Create a new `CriticalSectionDevice`
1818
pub fn new(bus: &'a Mutex<RefCell<T>>) -> Self {
1919
Self { bus }
2020
}

embedded-hal-bus/src/i2c/mutex.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ use std::sync::Mutex;
33

44
/// `std` `Mutex`-based shared bus [`I2c`] implementation.
55
///
6-
/// Sharing is implemented with a `std` [`Mutex`](std::sync::Mutex). It allows a single bus across multiple threads,
7-
/// with finer-grained locking than [`CriticalSectionDevice`](super::CriticalSectionDevice). The downside is
6+
/// Sharing is implemented with an `std` [`Mutex`](std::sync::Mutex). It allows a single bus across multiple threads,
7+
/// with finer-grained locking than [`CriticalSectionDevice`](super::CriticalSectionDevice). The downside is that
88
/// it is only available in `std` targets.
99
pub struct MutexDevice<'a, T> {
1010
bus: &'a Mutex<T>,
1111
}
1212

1313
impl<'a, T> MutexDevice<'a, T> {
14-
/// Create a new Mutexdevice
14+
/// Create a new `MutexDevice`
1515
pub fn new(bus: &'a Mutex<T>) -> Self {
1616
Self { bus }
1717
}

embedded-hal-bus/src/i2c/refcell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct RefCellDevice<'a, T> {
1111
}
1212

1313
impl<'a, T> RefCellDevice<'a, T> {
14-
/// Create a new RefCellDevice
14+
/// Create a new `RefCellDevice`
1515
pub fn new(bus: &'a RefCell<T>) -> Self {
1616
Self { bus }
1717
}

0 commit comments

Comments
 (0)