about summary refs log tree commit diff
path: root/src/libcollections/vec_map.rs
AgeCommit message (Collapse)AuthorLines
2014-12-20Fix fallout of removing import_shadowing in tests.Eduard Burtescu-4/+2
2014-12-20Fix the fallout of removing feature(import_shadowing).Eduard Burtescu-1/+0
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-4/+4
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-17rollup merge of #19902: alexcrichton/second-pass-memAlex Crichton-0/+2
This commit stabilizes the `mem` and `default` modules of std.
2014-12-17rollup merge of #19720: csouth3/vecmap-newtypesAlex Crichton-14/+45
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the iterators of `VecMap` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
2014-12-15Move hash module from collections to coreSteven Fackler-2/+2
2014-12-15std: Second pass stabilization of `default`Alex Crichton-0/+2
This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution.
2014-12-13Change `VecMap`'s iterators to use wrapper structs instead of typedefs.Chase Southwood-14/+45
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the iterators of `VecMap` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
2014-12-13libcollections: use unboxed closures in `VecMap` methodsJorge Aparicio-7/+6
2014-12-13libcollections: fix falloutJorge Aparicio-5/+10
2014-12-13libcollections: fix falloutJorge Aparicio-5/+8
2014-12-10auto merge of #19663 : tbu-/rust/pr_fix_vecmap, r=Gankrobors-35/+53
- Introduce a named type for the return type of `VecMap::move_iter` - Rename all type parameters to `V` for "Value". - Remove unnecessary call to an `Option::unwrap`, use pattern matching instead. - Remove incorrect `Hash` implementation which took the `VecMap`'s capacity into account. This is a [breaking-change], however whoever used the `Hash` implementation relied on an incorrect implementation.
2014-12-09Add a proper `Hash` implementation for `VecMap`Tobias Bucher-0/+37
Also re-add the previously deleted test with an additional test that would have failed before, when the hash function depended on the capacity.
2014-12-09Clean up `libcollections::VecMap`Tobias Bucher-54/+35
- Introduce a named type for the return type of `VecMap::move_iter` - Rename all type parameters to `V` for "Value". - Remove unnecessary call to an `Option::unwrap`, use pattern matching instead. - Remove incorrect `Hash` implementation which took the `VecMap`'s capacity into account. This is a [breaking-change], however whoever used the `Hash` implementation relied on an incorrect implementation.
2014-12-08Change 'Example' to 'Examples' throughout collections' rustdocs.jbranchaud-17/+17
2014-12-06libcollections: remove unnecessary `to_string()` callsJorge Aparicio-1/+1
2014-12-06libcollections: remove unnecessary `as_slice()` callsJorge Aparicio-1/+0
2014-12-04Add capacity() to VecMapAaron Liblong-0/+16
Changed capacity() tag to unstable and fixed doc assert
2014-11-08Renamed Extendable to Extendgamazeps-1/+1
In order to upgrade, simply rename the Extendable trait to Extend in your code Part of #18424 [breaking-change]
2014-11-06Implement low-hanging fruit of collection conventionsAlexis Beingessner-135/+131
* Renames/deprecates the simplest and most obvious methods * Adds FIXME(conventions)s for outstanding work * Marks "handled" methods as unstable NOTE: the semantics of reserve and reserve_exact have changed! Other methods have had their semantics changed as well, but in a way that should obviously not typecheck if used incorrectly. Lots of work and breakage to come, but this handles most of the core APIs and most eggregious breakage. Future changes should *mostly* focus on niche collections, APIs, or simply back-compat additions. [breaking-change]
2014-11-02refactor libcollections as part of collection reformAlexis Beingessner-0/+1052
* Moves multi-collection files into their own directory, and splits them into seperate files * Changes exports so that each collection has its own module * Adds underscores to public modules and filenames to match standard naming conventions (that is, treemap::{TreeMap, TreeSet} => tree_map::TreeMap, tree_set::TreeSet) * Renames PriorityQueue to BinaryHeap * Renames SmallIntMap to VecMap * Miscellanious fallout fixes [breaking-change]