Birunthan Mohanathas
d047cf1ec6
Change 'print(fmt!(...))' to printf!/printfln! in src/lib*
2013-07-24 09:45:20 -04:00
Michael Sullivan
a0f8540c95
Fix some impls such that all supertraits are actually implemented.
2013-07-23 17:06:32 -07:00
Erick Tryzelaar
1354cfa07f
clean up warnings
2013-07-23 16:57:00 -07:00
Erick Tryzelaar
31b77aecfc
std: remove str::to_owned and str::raw::slice_bytes_owned
2013-07-23 16:56:23 -07:00
Erick Tryzelaar
7af56bb921
std: move StrUtil::as_c_str into StrSlice
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9ad815e063
std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null
2013-07-23 16:56:17 -07:00
Graydon Hoare
ff0c2ae812
extra: rebase fallout.
2013-07-23 15:59:24 -07:00
Graydon Hoare
ff8d65eb37
extra: give up trying to make more fields of context cloneable, just use ARCs.
2013-07-23 15:23:02 -07:00
Graydon Hoare
fa8553e417
extra: switch json from hashmaps to treemaps
2013-07-23 15:23:02 -07:00
Graydon Hoare
9e4ebdb9d6
extra: add consume iter to treemap.
2013-07-23 15:23:02 -07:00
Graydon Hoare
31c180e5f5
extra: clean up workcache to use & in place of @ most places.
2013-07-23 15:23:02 -07:00
Graydon Hoare
1d9181bd76
extra: remove a @ in workcache config.
2013-07-23 15:23:02 -07:00
Graydon Hoare
9a093ab70a
extra: change workcache::Work::unwrap to move out of self.
2013-07-23 15:23:02 -07:00
Graydon Hoare
d5803e67ee
extra: access workcache db via RWARC.
2013-07-23 15:16:14 -07:00
Graydon Hoare
48dd72888c
extra: use deriving more in workcache, switch to treemaps.
2013-07-23 15:16:14 -07:00
bors
69a237ed7b
auto merge of #7944 : blake2-ppc/rust/dlist-move-nodes, r=bblum
...
Factor out internal methods to pop/push list nodes so that .merge() and .rotate_to_front(), .rotate_to_back() (new methods) can be implemented without allocating nodes.
With that, some cleanup changes to DList use of Option, and adding a missing Encodable implementation.
2013-07-23 04:46:41 -07:00
bors
dfdb72dbbe
auto merge of #7934 : sfackler/rust/smallintset, r=alexcrichton
...
SmallIntSet is equivalent to BitvSet but with 64 times the memory
overhead. There's no reason for it to exist.
SmallIntSet's overhead should really only be 8 times, but for some
reason, `sys::size_of::<Option<()>>() == 8`, not 1.
2013-07-23 03:04:39 -07:00
bors
6dfb0e5ad3
auto merge of #7703 : sfackler/rust/bitv, r=alexcrichton
...
Switched Bitv and BitvSet to external iterators. They still use some internal iterators internally (ha).
Derived clone for all Bitv types.
Removed indirection in BitvVariant. It previously held a unique pointer to the appropriate Bitv struct, even though those structs are the size of a pointer themselves. BitvVariant is the same size (16 bytes) as it was previously.
2013-07-22 19:13:39 -07:00
blake2-ppc
6e24b750e2
dlist: Rename rotate methods to .rotate_forward() and .rotate_backward()
2013-07-23 01:31:30 +02:00
Brian Anderson
6174f9a4d9
std: Move change_dir_locked to unstable. #7870
2013-07-22 14:16:52 -07:00
Brian Anderson
a637db2aa1
extra: Add url module
...
Used to be under extra::net, which no longer exists
2013-07-22 14:16:33 -07:00
Brian Anderson
219c1c71da
extra: Remove uv, net, timer code
...
This will all be reimplemented in the new runtime.
2013-07-22 14:16:33 -07:00
blake2-ppc
52b4a2eb6f
dlist: Fix .peek_next() w.r.t double ended iterators
...
.peek_next() needs to check the element counter just like the .next()
and .next_back() iterators do.
Also clarify .insert_next() doc w.r.t double ended iteration.
2013-07-22 17:51:11 +02:00
Daniel Micay
ed67cdb73c
new snapshot
2013-07-22 01:09:48 -04:00
Steven Fackler
8eb6d2d829
Eliminated SmallIntSet
...
SmallIntSet is equivalent to BitvSet but with 8 times the memory
overhead. There's no reason for it to exist.
2013-07-21 19:37:34 -04:00
blake2-ppc
cf437a2730
dlist: Remove extraneous unwrap in .pop_back_node()
2013-07-21 22:37:14 +02:00
blake2-ppc
21adfd5645
dlist: Use Ord for .insert_ordered()
...
We don't need TotalOrd for ordered insertion, just the normal sort order
Ord.
2013-07-21 21:05:48 +02:00
blake2-ppc
b1a071e314
dlist: Remove bench tests for vec
...
These tests for ~[] performance don't really belong here, they were for
comparison.
2013-07-21 21:05:48 +02:00
blake2-ppc
bfa9b43b71
dlist: Add bench test for rotate_to_{front, back}
2013-07-21 21:05:48 +02:00
bors
73e9a121d2
auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw
...
Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.
Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.
Fixes #7721
2013-07-21 11:22:38 -07:00
blake2-ppc
b71c3d250f
dlist: Add .rotate_to_front(), .rotate_to_back()
...
Add methods to move back element to front or front element to back,
without reallocating nodes.
2013-07-21 19:31:40 +02:00
blake2-ppc
78d0cf1409
dlist: Factor out pop and push operations by list node
...
Factor out internal methods for pop/push ~Node<T>, This allows moving
nodes instead of destructuring and allocating new.
Make use of this in .merge() so that it requires no allocations when
merging two DList.
2013-07-21 19:31:40 +02:00
blake2-ppc
5336bdcab1
dlist: Simplify match clauses to use Option methods
...
Make the core Deque implementation a bit simpler by using Option methods
when we simply map on a Some value, and deduplicate some common lines.
2013-07-21 19:31:40 +02:00
blake2-ppc
60cb9c003c
serialize: implement Encodable for DList
...
This impl was missing for unknown reason.
2013-07-21 19:31:40 +02: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
bors
c325cb0a42
auto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphism
...
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
2013-07-20 22:10:28 -07:00
bors
8476419fef
auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton
...
r? @nikomatsakis
2013-07-20 18:40:39 -07:00
Patrick Walton
06594ed96b
librustc: Remove pub extern
and priv extern
from the language.
...
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00
bors
75b4b1b027
auto merge of #7882 : blake2-ppc/rust/iterator-clone, r=thestinger
...
Implement method .cycle() that repeats an iterator endlessly
Implement Clone for simple iterators (without closures), including VecIterator.
> The theory is simple, the immutable iterators simply hold state
> variables (indicies or pointers) into frozen containers. We can freely
> clone these iterators, just like we can clone borrowed pointers.
2013-07-20 16:58:30 -07:00
blake2-ppc
fe134b9509
dlist: Implement Clone for immutable iterators
2013-07-20 20:30:58 +02:00
bors
5c999d4eca
auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brson
...
r? @brson
2013-07-20 10:55:34 -07:00
blake2-ppc
980646a450
Use Option .take() or .take_unwrap() instead of util::replace where possible
2013-07-20 05:12:05 -04:00
Ben Blum
621bc79d0d
Fix warnings in stdtest and extratest. Maybe somebody will care.
2013-07-20 05:12:05 -04:00
Ben Blum
10a400ffaa
Reimplement ARC::unwrap() and friends.
2013-07-20 05:08:55 -04:00
Matthijs Hofstra
eb74f0ccf6
Added a new method to extra::future (unwrap) + a test
2013-07-19 21:04:33 -04:00
Andreas Martens
51649b763e
smallint{map,set}: replace iterators with DoubleEndedIterator
...
Also changed the tests to iterate over sparse maps/sets.
2013-07-20 02:29:54 +02:00