Skip to content

Commit 7552959

Browse files
committed
Rename trait for further reuse
1 parent 70965e5 commit 7552959

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/pca9956b.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern crate i2cdev;
1010
extern crate docopt;
1111

1212
#[cfg(any(target_os = "linux", target_os = "android"))]
13-
use i2cdev::core::{I2CBus, I2CMessage};
13+
use i2cdev::core::{I2CTransfer, I2CMessage};
1414
#[cfg(any(target_os = "linux", target_os = "android"))]
1515
use i2cdev::linux::{LinuxI2CBus, LinuxI2CMessage};
1616

src/core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub trait I2CDevice {
123123
///
124124
/// Typical implementations will store state with references to the bus
125125
/// in use. The trait is based on the Linux i2cdev interface.
126-
pub trait I2CBus<'a> {
126+
pub trait I2CTransfer<'a> {
127127
type Error: Error;
128128
type Message: I2CMessage<'a>;
129129

src/linux.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// except according to those terms.
88

99
use ffi;
10-
use core::{I2CDevice, I2CBus};
10+
use core::{I2CDevice, I2CTransfer};
1111
use std::error::Error;
1212
use std::path::Path;
1313
use std::fs::File;
@@ -253,7 +253,7 @@ impl LinuxI2CBus {
253253
/// Linux I2C message
254254
pub type LinuxI2CMessage<'a> = ffi::i2c_msg;
255255

256-
impl<'a> I2CBus<'a> for LinuxI2CBus {
256+
impl<'a> I2CTransfer<'a> for LinuxI2CBus {
257257
type Error = LinuxI2CError;
258258
type Message = LinuxI2CMessage<'a>;
259259

0 commit comments

Comments
 (0)