summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortummychow <tummychow@users.noreply.github.com>2018-02-25 23:27:29 -0800
committertummychow <tummychow@users.noreply.github.com>2018-02-25 23:27:29 -0800
commit9d6aea560654ec7ef7903b20100feb445a451db7 (patch)
treee2f8f3d05fd049be6021c094421e0fd822d58295
parent2f2b32df82423b804c2339c43148fbac1dbd493d (diff)
use std::iter in commute
-rw-r--r--src/commute.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commute.rs b/src/commute.rs
index dd8a9e1..85a996e 100644
--- a/src/commute.rs
+++ b/src/commute.rs
@@ -1,6 +1,7 @@
extern crate failure;
use owned;
+use std::iter;
/// Returns the unchanged lines around this hunk.
///
@@ -44,7 +45,7 @@ fn anchors(hunk: &owned::Hunk) -> (usize, usize, usize, usize) {
/// as it finds two pairwise inequal elements.
fn uniform<I, E>(mut iter: I) -> bool
where
- I: ::std::iter::Iterator<Item = E>,
+ I: iter::Iterator<Item = E>,
E: ::std::cmp::Eq,
{
match iter.next() {
@@ -142,7 +143,7 @@ mod tests {
#[test]
fn test_commute_interleave() {
- let mut line = ::std::iter::repeat(b"bar\n".to_vec());
+ let mut line = iter::repeat(b"bar\n".to_vec());
let hunk1 = owned::Hunk {
added: owned::Block {
start: 1,