Skip to content

Commit

Permalink
Merge pull request rust-lang#2165 from taiki-e/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
Nemo157 authored May 27, 2020
2 parents 913841e + 20f0b48 commit 8f7087d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion futures/tests/io_window.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#![cfg(feature = "std")]
#![allow(clippy::reversed_empty_ranges)] // This is intentional.

use futures::io::Window;

#[test]
fn set() {
let mut buffer = Window::new(&[1, 2, 3]);
buffer.set(..3);
assert_eq!(buffer.as_ref(), &[1, 2, 3]);
buffer.set(3..3);
assert_eq!(buffer.as_ref(), &[]);
buffer.set(3..=2); // == 3..3
assert_eq!(buffer.as_ref(), &[]);
buffer.set(0..2);

assert_eq!(buffer.as_ref(), &[1, 2]);
}

Expand Down

0 comments on commit 8f7087d

Please sign in to comment.