Florian Hahn
de39874801
Rename str::from_bytes to str::from_utf8, closes #8985
2013-09-05 14:17:24 +02:00
blake2-ppc
7c369ee733
std/extra: Add ExactSize for Bitv, DList, RingBuf, Option iterators
2013-09-01 18:20:24 +02:00
Erick Tryzelaar
68f40d215e
std: Rename Iterator.transform -> .map
...
cc #5898
2013-08-10 07:33:21 -07:00
blake2-ppc
40bdbf0f5d
std: Fix for-range loops that can use iterators
...
Fix inappropriate for-range loops to use for-iterator constructs (or
other appropriate solution) instead.
2013-08-07 22:39:57 -04:00
blake2-ppc
ea9c5c405e
std: Remove uint::iterate, replaced by range
2013-08-06 04:05:08 +02:00
blake2-ppc
08d0b70213
extra: Simplify the bitv iterators using Repeat
2013-08-06 04:05:08 +02:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
OGINO Masanori
682939724f
Rename sum -> _sum.
...
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-03 03:20:56 -04:00
Daniel Micay
b3ad685f7f
replace all remaining for
with foreach
or do
2013-08-03 03:00:42 -04:00
Daniel Micay
234acad404
replace range
with an external iterator
2013-08-02 00:51:14 -04:00
blake2-ppc
78cde5b9fb
std: Change Times
trait to use do
instead of for
...
Change the former repetition::
for 5.times { }
to::
do 5.times { }
.times() cannot be broken with `break` or `return` anymore; for those
cases, use a numerical range loop instead.
2013-08-01 16:54:22 +02:00
blake2-ppc
e5a64f2add
std: Remove the internal iterator methods from trait Set
...
.intersection(), .union() etc methods in trait std::container::Set use
internal iters. Remove these methods from the trait.
I reported issue #8154 for the reinstatement of iterator-based set algebra
methods to the Set trait.
For bitv and treemap, that lack Iterator implementations of set
operations, preserve them as methods directly on the types themselves.
For HashSet, these methods are replaced by the present .union_iter()
etc.
2013-08-01 16:54:22 +02:00
blake2-ppc
310e0b6e92
extra: Use external iterators in bitv implementation
...
Convert some internally used functions to use a external iterators.
Change all uses of remaining internal iterators to use `do` expr
2013-08-01 16:54:22 +02:00
blake2-ppc
dbcb74e247
extra: Replace for
with do { .. }
expr where internal iterators are used
2013-08-01 16:54:22 +02:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
blake2-ppc
ae09d95160
extra: Add .rev_iter() for bitv
2013-07-30 02:48:40 +02:00
blake2-ppc
2f10d1e295
extra: Implement DoubleEnded and RandomAccess iterators for bitv
2013-07-30 01:48:17 +02:00
Steven Fackler
feb18fe8da
Added default impls for container methods
...
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-25 15:17:30 -07:00
Steven Fackler
fd757a8ab0
Added bitv iterator benchmarks
2013-07-21 03:22:59 -04:00
Steven Fackler
0b4d8d6882
Added iterator tests
2013-07-21 03:22:59 -04:00
Steven Fackler
d6923ddf64
Removed unecessary indirection in Bitv
...
BitvVariant is the same size as it was before (16 bytes).
2013-07-21 03:22:59 -04:00
Steven Fackler
b32a02cdba
Derive Clone for bitv stuff
2013-07-21 03:22:59 -04:00
Steven Fackler
5f208b82e9
Switched bitv to external iterators
2013-07-21 03:22:21 -04:00
blake2-ppc
e93dd34cd3
Fix warnings in libextra tests
...
Most of these are "unneccesary allocation" in bitv, for ~[false, ..] instead
of [false, ..].
2013-07-18 02:18:53 +02:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Steven Fackler
6b37b5bab7
Split mutable methods out of Set and Map
...
Fixes most of #4989 . I didn't add Persistent{Set,Map} since the only
persistent data structure is fun_treemap and its functionality is
currently too limited to build a trait out of.
2013-07-13 19:44:36 -07:00
bors
96453eb5c5
auto merge of #7736 : thestinger/rust/doc, r=thestinger
...
2b96408 r=sanxiyn
documents conversion, size hints and double-ended iterators and adds
more of the traits to the prelude
2013-07-12 13:34:29 -07:00
Chris Morgan
5b656cfbcb
Replace owned with borrowed pointer.
...
As pointed out by cmr, there's no need for it to be owned there.
That was also in the original scope of #7711 .
2013-07-12 23:17:59 +10:00
Daniel Micay
2b96408600
extend the iterator tutorial
...
documents conversion, size hints and double-ended iterators and adds
more of the traits to the prelude
2013-07-12 01:53:50 -04:00
Chris Morgan
b8e95c4602
Make Bitv::eq_vec take ~[bool] rather than ~[uint]
...
Fixes #7711 .
2013-07-12 09:52:49 +10:00
Jens Nockert
1aae28a57d
Replaces the free-standing functions in f32, &c.
...
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.
If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.
Note: If you were using a function that corresponds to an operator, use
the operator instead.
2013-07-08 18:05:17 +02:00
Huon Wilson
c437a16c5d
rustc: add a lint to enforce uppercase statics.
2013-07-01 17:52:57 +10:00
bors
6fcd8bf567
auto merge of #7468 : cmr/rust/great_renaming, r=pcwalton
2013-06-30 01:19:38 -07:00
Alex Crichton
b29c368674
Removing a lot of usage of '&const'
2013-06-29 08:35:48 -07:00
Corey Richardson
71b1c6ab60
Warning cleanup
2013-06-29 11:20:04 -04:00
Corey Richardson
1662bd371c
Great renaming: propagate throughout the rest of the codebase
2013-06-29 11:20:02 -04:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00
Daniel Micay
e2e39234cc
remove old_iter
...
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and
written in an ancient dialect of Rust so I've just removed it
this also removes `to_vec` from DList because it's provided by
`std::iter::to_vec`
an Iterator implementation is added for OptVec but some transitional
internal iterator methods are still left
2013-06-24 01:35:11 -04:00
Daniel Micay
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
Graydon Hoare
d904c72af8
replace #[inline(always)] with #[inline]. r=burningtree.
2013-06-18 14:48:48 -07:00
Patrick Walton
5fb254695b
Remove all uses of pub impl
. rs=style
2013-06-01 09:18:27 -07:00
Daniel Farina
aef1e10eba
Remove unnecessary 'use' forms
...
Fix a laundry list of warnings involving unused imports that glutted
up compilation output. There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.
2013-05-30 13:08:18 -07:00
Alex Crichton
395685079a
libextra: Require documentation by default
2013-05-30 01:03:15 -05:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Alex Crichton
b04c40bb1c
Silence various warnings throughout test modules
2013-05-28 15:27:35 -05:00
Seo Sanghyeon
8f80323f09
Remove unnecessary allocations flagged by lint
2013-05-28 03:14:44 +09:00
Erick Tryzelaar
609a9e69e1
cleanup warnings from libextra
2013-05-23 17:57:06 -07:00
Patrick Walton
f3723cf7c4
libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra
2013-05-22 21:57:07 -07:00
Patrick Walton
0c820d4123
libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
...
This only changes the directory names; it does not change the "real"
metadata names.
2013-05-22 21:57:05 -07:00