Skip to content

Commit 2b0f741

Browse files
committed
---
yaml --- r: 144909 b: refs/heads/try2 c: bb30f04 h: refs/heads/master i: 144907: 35eef4a v: v3
1 parent bb0ca96 commit 2b0f741

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+885
-885
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: af259a651d52e7243c74a833b2b39a61890e89fe
8+
refs/heads/try2: bb30f047f6dbb5c8a73d105b25c2dc23d814b9ba
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/tutorial-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ for i in range(0, 5) {
200200
printf!("%d ", i) // prints "0 1 2 3 4"
201201
}
202202

203-
for i in std::iter::range_inclusive(0, 5) { // needs explicit import
203+
for i in std::iterator::range_inclusive(0, 5) { // needs explicit import
204204
printf!("%d ", i) // prints "0 1 2 3 4 5"
205205
}
206206
~~~

branches/try2/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
176176

177177
export PYTHONPATH := $(PYTHONPATH):$$(S)src/gyp/pylib
178178

179-
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_DEPS)
179+
$$(LIBUV_MAKEFILE_$(1)_$(2)):
180180
(cd $(S)src/libuv/ && \
181181
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
182182
-Goutput_dir=$$(@D) --generator-output $$(@D))

branches/try2/src/etc/unicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def emit_decomp_module(f, canon, compat, combine):
310310
+ " bsearch_range_value_table(c, combining_class_table)\n"
311311
+ " }\n\n")
312312
f.write(" fn d(c: char, i: &fn(char), k: bool) {\n")
313-
f.write(" use iter::Iterator;\n");
313+
f.write(" use iterator::Iterator;\n");
314314

315315
f.write(" if c <= '\\x7f' { i(c); return; }\n")
316316

branches/try2/src/libextra/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313

1414
use std::cmp;
15-
use std::iter::RandomAccessIterator;
16-
use std::iter::{Invert, Enumerate, Repeat, Map, Zip};
15+
use std::iterator::RandomAccessIterator;
16+
use std::iterator::{Invert, Enumerate, Repeat, Map, Zip};
1717
use std::num;
1818
use std::ops;
1919
use std::uint;

branches/try2/src/libextra/dlist.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
use std::cast;
2626
use std::ptr;
2727
use std::util;
28-
use std::iter::Invert;
29-
use std::iter;
28+
use std::iterator::{FromIterator, Extendable, Invert};
29+
use std::iterator;
3030

3131
use container::Deque;
3232

@@ -593,27 +593,27 @@ impl<A> Extendable<A> for DList<A> {
593593
impl<A: Eq> Eq for DList<A> {
594594
fn eq(&self, other: &DList<A>) -> bool {
595595
self.len() == other.len() &&
596-
iter::order::eq(self.iter(), other.iter())
596+
iterator::order::eq(self.iter(), other.iter())
597597
}
598598

599599
fn ne(&self, other: &DList<A>) -> bool {
600600
self.len() != other.len() ||
601-
iter::order::ne(self.iter(), other.iter())
601+
iterator::order::ne(self.iter(), other.iter())
602602
}
603603
}
604604

605605
impl<A: Eq + Ord> Ord for DList<A> {
606606
fn lt(&self, other: &DList<A>) -> bool {
607-
iter::order::lt(self.iter(), other.iter())
607+
iterator::order::lt(self.iter(), other.iter())
608608
}
609609
fn le(&self, other: &DList<A>) -> bool {
610-
iter::order::le(self.iter(), other.iter())
610+
iterator::order::le(self.iter(), other.iter())
611611
}
612612
fn gt(&self, other: &DList<A>) -> bool {
613-
iter::order::gt(self.iter(), other.iter())
613+
iterator::order::gt(self.iter(), other.iter())
614614
}
615615
fn ge(&self, other: &DList<A>) -> bool {
616-
iter::order::ge(self.iter(), other.iter())
616+
iterator::order::ge(self.iter(), other.iter())
617617
}
618618
}
619619

branches/try2/src/libextra/enum_set.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::iterator::Iterator;
12+
1113
#[deriving(Clone, Eq, IterBytes, ToStr)]
1214
/// A specialized Set implementation to use enum types.
1315
pub struct EnumSet<E> {

branches/try2/src/libextra/json.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
1919
use std::char;
2020
use std::cast::transmute;
21+
use std::iterator;
2122
use std::float;
2223
use std::hashmap::HashMap;
2324
use std::io::WriterUtil;
@@ -488,7 +489,7 @@ pub struct Parser<T> {
488489
}
489490

490491
/// Decode a json value from an Iterator<char>
491-
pub fn Parser<T : Iterator<char>>(rdr: ~T) -> Parser<T> {
492+
pub fn Parser<T : iterator::Iterator<char>>(rdr: ~T) -> Parser<T> {
492493
let mut p = Parser {
493494
rdr: rdr,
494495
ch: '\x00',
@@ -499,7 +500,7 @@ pub fn Parser<T : Iterator<char>>(rdr: ~T) -> Parser<T> {
499500
p
500501
}
501502

502-
impl<T: Iterator<char>> Parser<T> {
503+
impl<T: iterator::Iterator<char>> Parser<T> {
503504
pub fn parse(&mut self) -> Result<Json, Error> {
504505
match self.parse_value() {
505506
Ok(value) => {
@@ -517,7 +518,7 @@ impl<T: Iterator<char>> Parser<T> {
517518
}
518519
}
519520

520-
impl<T : Iterator<char>> Parser<T> {
521+
impl<T : iterator::Iterator<char>> Parser<T> {
521522
// FIXME: #8971: unsound
522523
fn eof(&self) -> bool { self.ch == unsafe { transmute(-1u32) } }
523524

branches/try2/src/libextra/num/bigint.rs

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -153,43 +153,6 @@ impl Orderable for BigUint {
153153
}
154154
}
155155

156-
impl BitAnd<BigUint, BigUint> for BigUint {
157-
fn bitand(&self, other: &BigUint) -> BigUint {
158-
let new_len = num::min(self.data.len(), other.data.len());
159-
let anded = do vec::from_fn(new_len) |i| {
160-
// i will never be less than the size of either data vector
161-
let ai = self.data[i];
162-
let bi = other.data[i];
163-
ai & bi
164-
};
165-
return BigUint::new(anded);
166-
}
167-
}
168-
169-
impl BitOr<BigUint, BigUint> for BigUint {
170-
fn bitor(&self, other: &BigUint) -> BigUint {
171-
let new_len = num::max(self.data.len(), other.data.len());
172-
let ored = do vec::from_fn(new_len) |i| {
173-
let ai = if i < self.data.len() { self.data[i] } else { 0 };
174-
let bi = if i < other.data.len() { other.data[i] } else { 0 };
175-
ai | bi
176-
};
177-
return BigUint::new(ored);
178-
}
179-
}
180-
181-
impl BitXor<BigUint, BigUint> for BigUint {
182-
fn bitxor(&self, other: &BigUint) -> BigUint {
183-
let new_len = num::max(self.data.len(), other.data.len());
184-
let xored = do vec::from_fn(new_len) |i| {
185-
let ai = if i < self.data.len() { self.data[i] } else { 0 };
186-
let bi = if i < other.data.len() { other.data[i] } else { 0 };
187-
ai ^ bi
188-
};
189-
return BigUint::new(xored);
190-
}
191-
}
192-
193156
impl Shl<uint, BigUint> for BigUint {
194157
#[inline]
195158
fn shl(&self, rhs: &uint) -> BigUint {
@@ -1203,48 +1166,6 @@ mod biguint_tests {
12031166
}
12041167
}
12051168
1206-
#[test]
1207-
fn test_bitand() {
1208-
fn check(left: ~[BigDigit],
1209-
right: ~[BigDigit],
1210-
expected: ~[BigDigit]) {
1211-
assert_eq!(BigUint::new(left) & BigUint::new(right),
1212-
BigUint::new(expected));
1213-
}
1214-
check(~[], ~[], ~[]);
1215-
check(~[268, 482, 17],
1216-
~[964, 54],
1217-
~[260, 34]);
1218-
}
1219-
1220-
#[test]
1221-
fn test_bitor() {
1222-
fn check(left: ~[BigDigit],
1223-
right: ~[BigDigit],
1224-
expected: ~[BigDigit]) {
1225-
assert_eq!(BigUint::new(left) | BigUint::new(right),
1226-
BigUint::new(expected));
1227-
}
1228-
check(~[], ~[], ~[]);
1229-
check(~[268, 482, 17],
1230-
~[964, 54],
1231-
~[972, 502, 17]);
1232-
}
1233-
1234-
#[test]
1235-
fn test_bitxor() {
1236-
fn check(left: ~[BigDigit],
1237-
right: ~[BigDigit],
1238-
expected: ~[BigDigit]) {
1239-
assert_eq!(BigUint::new(left) ^ BigUint::new(right),
1240-
BigUint::new(expected));
1241-
}
1242-
check(~[], ~[], ~[]);
1243-
check(~[268, 482, 17],
1244-
~[964, 54],
1245-
~[712, 468, 17]);
1246-
}
1247-
12481169
#[test]
12491170
fn test_shl() {
12501171
fn check(s: &str, shift: uint, ans: &str) {
@@ -2090,13 +2011,13 @@ mod bigint_tests {
20902011
#[cfg(test)]
20912012
mod bench {
20922013
use super::*;
2093-
use std::{iter, util};
2014+
use std::{iterator, util};
20942015
use std::num::{Zero, One};
20952016
use extra::test::BenchHarness;
20962017

20972018
fn factorial(n: uint) -> BigUint {
20982019
let mut f: BigUint = One::one();
2099-
for i in iter::range_inclusive(1, n) {
2020+
for i in iterator::range_inclusive(1, n) {
21002021
f = f * BigUint::from_uint(i);
21012022
}
21022023
f

branches/try2/src/libextra/priority_queue.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::clone::Clone;
1616
use std::unstable::intrinsics::{move_val_init, init};
1717
use std::util::{replace, swap};
1818
use std::vec;
19+
use std::iterator::{FromIterator, Extendable};
1920

2021
/// A priority queue implemented with a binary heap
2122
#[deriving(Clone)]

branches/try2/src/libextra/ringbuf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
use std::num;
1717
use std::vec;
18-
use std::iter::{Invert, RandomAccessIterator};
18+
use std::iterator::{FromIterator, Invert, RandomAccessIterator, Extendable};
1919

2020
use container::Deque;
2121

@@ -694,13 +694,13 @@ mod tests {
694694

695695
#[test]
696696
fn test_from_iterator() {
697-
use std::iter;
697+
use std::iterator;
698698
let v = ~[1,2,3,4,5,6,7];
699699
let deq: RingBuf<int> = v.iter().map(|&x| x).collect();
700700
let u: ~[int] = deq.iter().map(|&x| x).collect();
701701
assert_eq!(u, v);
702702

703-
let mut seq = iter::count(0u, 2).take(256);
703+
let mut seq = iterator::count(0u, 2).take(256);
704704
let deq: RingBuf<uint> = seq.collect();
705705
for (i, &x) in deq.iter().enumerate() {
706706
assert_eq!(2*i, x);

branches/try2/src/libextra/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#[allow(missing_doc)];
1717

18-
use std::iter::{Enumerate, FilterMap, Invert};
18+
use std::iterator::{Iterator, Enumerate, FilterMap, Invert};
1919
use std::util::replace;
2020
use std::vec::{VecIterator, VecMutIterator};
2121
use std::vec;

branches/try2/src/libextra/treemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515

1616
use std::util::{swap, replace};
17-
use std::iter::{Peekable};
17+
use std::iterator::{FromIterator, Extendable, Peekable};
1818
use std::cmp::Ordering;
1919

2020
// This is implemented as an AA tree, which is a simplified variation of

0 commit comments

Comments
 (0)