Skip to content

Commit 78b6876

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 167877 b: refs/heads/master c: 6c0ad5b h: refs/heads/master i: 167875: 3fbe9a1 v: v3
1 parent aa292b7 commit 78b6876

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 91eeb641cd53344d8a5a06d8b768cda3ccd030c3
2+
refs/heads/master: 6c0ad5b5641f12e0696f9ae0e96fe055f4c27ca3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c89417130f042c58adc60012e7cddc4ef70b70b9
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb

trunk/src/test/bench/shootout-fasta.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ impl<'a> AAGen<'a> {
7575
AAGen { rng: rng, data: data }
7676
}
7777
}
78-
impl<'a> Iterator<u8> for AAGen<'a> {
78+
impl<'a> Iterator for AAGen<'a> {
79+
type Item = u8;
80+
7981
fn next(&mut self) -> Option<u8> {
8082
let r = self.rng.gen();
8183
self.data.iter()
@@ -85,7 +87,7 @@ impl<'a> Iterator<u8> for AAGen<'a> {
8587
}
8688
}
8789

88-
fn make_fasta<W: Writer, I: Iterator<u8>>(
90+
fn make_fasta<W: Writer, I: Iterator<Item=u8>>(
8991
wr: &mut W, header: &str, mut it: I, mut n: uint)
9092
-> std::io::IoResult<()>
9193
{

trunk/src/test/bench/shootout-k-nucleotide.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ impl Table {
194194
}
195195
}
196196

197-
impl<'a> Iterator<&'a Entry> for Items<'a> {
197+
impl<'a> Iterator for Items<'a> {
198+
type Item = &'a Entry;
199+
198200
fn next(&mut self) -> Option<&'a Entry> {
199201
let ret = match self.cur {
200202
None => {

trunk/src/test/bench/shootout-meteor.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ struct Iterate<'a, T> {
5757
f: |&T|: 'a -> T,
5858
next: T
5959
}
60-
impl<'a, T> Iterator<T> for Iterate<'a, T> {
60+
impl<'a, T> Iterator for Iterate<'a, T> {
61+
type Item = T;
62+
6163
fn next(&mut self) -> Option<T> {
6264
let mut res = (self.f)(&self.next);
6365
std::mem::swap(&mut res, &mut self.next);
@@ -78,7 +80,9 @@ impl<'a, T> List<'a, T> {
7880
ListIterator{cur: self}
7981
}
8082
}
81-
impl<'a, T> Iterator<&'a T> for ListIterator<'a, T> {
83+
impl<'a, T> Iterator for ListIterator<'a, T> {
84+
type Item = &'a T;
85+
8286
fn next(&mut self) -> Option<&'a T> {
8387
match *self.cur {
8488
List::Nil => None,

trunk/src/test/bench/shootout-reverse-complement.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ struct MutDnaSeqs<'a> { s: &'a mut [u8] }
150150
fn mut_dna_seqs<'a>(s: &'a mut [u8]) -> MutDnaSeqs<'a> {
151151
MutDnaSeqs { s: s }
152152
}
153-
impl<'a> Iterator<&'a mut [u8]> for MutDnaSeqs<'a> {
153+
impl<'a> Iterator for MutDnaSeqs<'a> {
154+
type Item = &'a mut [u8];
155+
154156
fn next(&mut self) -> Option<&'a mut [u8]> {
155157
let tmp = std::mem::replace(&mut self.s, &mut []);
156158
let tmp = match memchr(tmp, b'\n') {
@@ -229,7 +231,7 @@ unsafe impl<T: 'static> Send for Racy<T> {}
229231
/// The closure `f` is run in parallel with an element of `iter`.
230232
fn parallel<'a, I, T, F>(mut iter: I, f: F)
231233
where T: 'a+Send + Sync,
232-
I: Iterator<&'a mut [T]>,
234+
I: Iterator<Item=&'a mut [T]>,
233235
F: Fn(&mut [T]) + Sync {
234236
use std::mem;
235237
use std::raw::Repr;

0 commit comments

Comments
 (0)