Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo. #40

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
}

/// Sends the (7-Bit) address on the I2C bus. The 8th bit on the bus is set
/// depending on wether it is a read or write transfer.
/// depending on whether it is a read or write transfer.
fn send_addr(&self, addr: u8, read: bool) {
self.i2c
.data
Expand Down Expand Up @@ -659,7 +659,7 @@
let operations_count = operations.len();
// `Some(true)` if the last operation was a read, `Some(false)` if it was a write.
let mut last_operation_read = None;
for (i, operation) in operations.into_iter().enumerate() {

Check warning on line 662 in src/i2c.rs

View workflow job for this annotation

GitHub Actions / clippy

this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice`

warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` --> src/i2c.rs:662:42 | 662 | for (i, operation) in operations.into_iter().enumerate() { | ^^^^^^^^^ help: call directly: `iter_mut` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` on by default
match operation {
Operation::Read(buffer) => {
if last_operation_read != Some(true) {
Expand Down
Loading