about summary refs log tree commit diff
path: root/src/libcollections/vec_map.rs
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2015-03-18 23:36:19 -0700
committerAaron Turon <aturon@mozilla.com>2015-03-18 23:36:19 -0700
commit6f693e94868b12fcffa9d5b53b2ca02778ff8daa (patch)
tree51adf0ab2fdcf265406dc136f00006e883880767 /src/libcollections/vec_map.rs
parent0084f92302b3352372bfd14ebbf083bae695d16e (diff)
downloadrust-6f693e94868b12fcffa9d5b53b2ca02778ff8daa.tar.gz
rust-6f693e94868b12fcffa9d5b53b2ca02778ff8daa.zip
Stabilize Entry types
This commit marks as `#[stable]` the `Entry` types for the maps provided
by `std`. The main reason these had been left unstable previously was
uncertainty about an eventual trait design, but several plausible
designs have been proposed that all work fine with the current type definitions.
Diffstat (limited to 'src/libcollections/vec_map.rs')
-rw-r--r--src/libcollections/vec_map.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs
index 6e67d876327..056be4acaeb 100644
--- a/src/libcollections/vec_map.rs
+++ b/src/libcollections/vec_map.rs
@@ -67,26 +67,28 @@ pub struct VecMap<V> {
 }
 
 /// A view into a single entry in a map, which may either be vacant or occupied.
-#[unstable(feature = "collections",
-           reason = "precise API still under development")]
+
+#[stable(feature = "rust1", since = "1.0.0")]
 pub enum Entry<'a, V:'a> {
     /// A vacant Entry
+    #[stable(feature = "rust1", since = "1.0.0")]
     Vacant(VacantEntry<'a, V>),
+
     /// An occupied Entry
+    #[stable(feature = "rust1", since = "1.0.0")]
     Occupied(OccupiedEntry<'a, V>),
 }
 
 /// A vacant Entry.
-#[unstable(feature = "collections",
-           reason = "precise API still under development")]
+
+#[stable(feature = "rust1", since = "1.0.0")]
 pub struct VacantEntry<'a, V:'a> {
     map: &'a mut VecMap<V>,
     index: usize,
 }
 
 /// An occupied Entry.
-#[unstable(feature = "collections",
-           reason = "precise API still under development")]
+#[stable(feature = "rust1", since = "1.0.0")]
 pub struct OccupiedEntry<'a, V:'a> {
     map: &'a mut VecMap<V>,
     index: usize,
@@ -651,7 +653,7 @@ impl<V> VecMap<V> {
 
 impl<'a, V> Entry<'a, V> {
     #[unstable(feature = "collections",
-               reason = "matches collection reform v2 specification, waiting for dust to settle")]
+               reason = "will soon be replaced by or_insert")]
     /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant
     pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, V>> {
         match self {