Skip to content

Commit d48de2e

Browse files
committed
pub use instead of type to expose LinuxI2CMessage for docs
The type alias means that the methods like `with_address` and `with_flags` are not shown in the documentation.
1 parent cce3858 commit d48de2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ffi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use std::ptr;
1919

2020
pub type I2CError = nix::Error;
2121

22+
/// Linux I2C message
2223
#[repr(C)]
2324
pub struct i2c_msg<'a> {
2425
/// slave address

src/linux.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,7 @@ impl LinuxI2CBus {
316316
}
317317
}
318318

319-
/// Linux I2C message
320-
pub type LinuxI2CMessage<'a> = ffi::i2c_msg<'a>;
319+
pub use ffi::i2c_msg as LinuxI2CMessage;
321320

322321
impl<'a> I2CTransfer<'a> for LinuxI2CBus {
323322
type Error = LinuxI2CError;

0 commit comments

Comments
 (0)