Florian Hahn
de39874801
Rename str::from_bytes to str::from_utf8, closes #8985
2013-09-05 14:17:24 +02:00
Daniel Micay
62a3434529
stop treating char as an integer type
...
Closes #7609
2013-09-04 08:07:56 -04:00
David Creswick
31fa86511c
drop some redundant Ord method implementations
2013-08-29 14:24:24 -05:00
Brandon Sanderson
3b9e2efd64
Make json::to_xxx(&Json) fns Json::to_xxx(&self)
...
to_str, to_pretty_str, to_writer, and to_pretty_writer were at the top
level of extra::json, this moves them into an impl for Json to match
with what's been done for the rest of libextra and libstd.
2013-08-21 22:49:17 -07:00
Erick Tryzelaar
fad7857c7b
Mass rename of .consume{,_iter}() to .move_iter()
...
cc #7887
2013-08-10 07:01:07 -07:00
Alex Crichton
991648d099
Use TreeMap's ord implementation for Json
...
Closes #4430
2013-08-05 13:20:48 -07:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -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
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Erick Tryzelaar
2a68c719f4
to_either + fixes
2013-07-27 23:41:09 -07:00
Graydon Hoare
fa8553e417
extra: switch json from hashmaps to treemaps
2013-07-23 15:23:02 -07:00
blake2-ppc
7ef9e722b8
hashmap: Remove .consume() has rename .consume_iter() to .consume()
...
Updated all users of HashMap, HashSet old .consume() to use .consume()
with a for loop.
Since .consume() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
2013-07-18 15:03:59 +02:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Austin King
b7e4b88c4a
Noting that json.rs provides parsing as well
2013-07-14 18:26:45 -07:00
Graydon Hoare
bbdbd3c69d
extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus a few test breaking fixes.
2013-07-11 15:16:11 -07:00
Graydon Hoare
83fb3d224a
extra: add metrics ratchet to test driver.
2013-07-11 13:15:52 -07:00
Graydon Hoare
bf1f69c156
extra: add ToJson for TreeMap.
2013-07-11 13:15:52 -07:00
Gary Linscott
f091a1e075
Convert json Reader to iterators
...
This is much faster for strings, and eventually when there is a
buffered reader of some sort.
Reading example.json 100 times before was around 1.18s.
After:
- reading from string 0.68s
- reading from file 1.08s (extra time is all in io::Reader)
2013-07-10 23:08:13 -04:00
bors
30c8aac677
auto merge of #7612 : thestinger/rust/utf8, r=huonw
2013-07-08 16:10:53 -07:00
bors
f503e539bf
auto merge of #7608 : glinscott/rust/json_perf, r=pcwalton
...
Avoids the overhead of read_char for every character.
Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance
Before: 2.55s
After: 0.16s
Regression testing is already done by isrustfastyet.
2013-07-08 14:34:54 -07:00
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04:00
Daniel Micay
51eb1e14d4
str: stop encoding invalid out-of-range char
2013-07-05 21:07:37 -04:00
Gary Linscott
37494d39d3
Switch json parsing to read_chars for performance
...
Avoids the overhead of read_char for every character.
Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance
Before: 2.55s
After: 0.16s
Regression testing is already done by isrustfastyet.
2013-07-05 19:40:01 -04:00
Huon Wilson
eee6775642
Implement consuming iterators for ~[], remove vec::{consume, consume_reverse, map_consume}.
2013-07-04 00:46:49 +10: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
e67c48a591
remove each
from vec, HashMap and HashSet
2013-06-25 16:28:02 -04:00
Daniel Micay
d2e9912aea
vec: remove BaseIter implementation
...
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
Daniel Micay
883c966d5c
vec: replace position
with iter().position_
2013-06-21 03:23:59 -04:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Huon Wilson
1553874149
std: convert str::reserve* to methods, and methodise str::push_*.
2013-06-10 23:02:55 +10:00
Huon Wilson
b29cd22bce
std: replace str::all/any fns and methods with iterators
2013-06-10 23:02:54 +10:00
Huon Wilson
4b806b4d06
std: remove each_char* fns and methods from str, replaced by iterators.
2013-06-09 02:22:23 +10:00
Patrick Walton
5fb254695b
Remove all uses of pub impl
. rs=style
2013-06-01 09:18:27 -07:00
Niko Matsakis
7a1a40890d
Remove copy bindings from patterns.
2013-05-30 15:20:36 -04: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
ee52865c88
test: Update tests and import the prelude in some more places.
2013-05-22 21:57:10 -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