about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2015-04-13 10:21:32 -0400
committerAndrew Paseltiner <apaseltiner@gmail.com>2015-04-13 13:57:51 -0400
commit6fa16d6a473415415cb87a1fe6754aace32cbb1c (patch)
tree6009800c0605908efff7b33c6711b5924d4f70d0 /src/libcollections
parent588d37c653ddac491c2c1cb8974f56781533b173 (diff)
downloadrust-6fa16d6a473415415cb87a1fe6754aace32cbb1c.tar.gz
rust-6fa16d6a473415415cb87a1fe6754aace32cbb1c.zip
pluralize doc comment verbs and add missing periods
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/bit.rs4
-rw-r--r--src/libcollections/btree/map.rs4
-rw-r--r--src/libcollections/btree/set.rs4
-rw-r--r--src/libcollections/slice.rs6
-rw-r--r--src/libcollections/str.rs8
-rw-r--r--src/libcollections/string.rs14
-rw-r--r--src/libcollections/vec.rs6
-rw-r--r--src/libcollections/vec_deque.rs2
-rw-r--r--src/libcollections/vec_map.rs4
9 files changed, 26 insertions, 26 deletions
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index d9255241af0..d12b979e084 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -923,7 +923,7 @@ impl BitVec {
         self.set(insert_pos, elem);
     }
 
-    /// Return the total number of bits in this vector
+    /// Returns the total number of bits in this vector
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.nbits }
@@ -1695,7 +1695,7 @@ impl BitSet {
         self.other_op(other, |w1, w2| w1 ^ w2);
     }
 
-    /// Return the number of set bits in this set.
+    /// Returns the number of set bits in this set.
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize  {
diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs
index e704a956492..413100039a2 100644
--- a/src/libcollections/btree/map.rs
+++ b/src/libcollections/btree/map.rs
@@ -1339,7 +1339,7 @@ impl<K, V> BTreeMap<K, V> {
         Values { inner: self.iter().map(second) }
     }
 
-    /// Return the number of elements in the map.
+    /// Returns the number of elements in the map.
     ///
     /// # Examples
     ///
@@ -1354,7 +1354,7 @@ impl<K, V> BTreeMap<K, V> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.length }
 
-    /// Return true if the map contains no elements.
+    /// Returns true if the map contains no elements.
     ///
     /// # Examples
     ///
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index 840110b5b27..1abd56fd145 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -284,7 +284,7 @@ impl<T: Ord> BTreeSet<T> {
         Union{a: self.iter().peekable(), b: other.iter().peekable()}
     }
 
-    /// Return the number of elements in the set
+    /// Returns the number of elements in the set.
     ///
     /// # Examples
     ///
@@ -299,7 +299,7 @@ impl<T: Ord> BTreeSet<T> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn len(&self) -> usize { self.map.len() }
 
-    /// Returns true if the set contains no elements
+    /// Returns true if the set contains no elements.
     ///
     /// # Examples
     ///
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs
index 8622b8cd935..5be9739cb32 100644
--- a/src/libcollections/slice.rs
+++ b/src/libcollections/slice.rs
@@ -549,7 +549,7 @@ impl<T> [T] {
         core_slice::SliceExt::binary_search_by(self, f)
     }
 
-    /// Return the number of elements in the slice
+    /// Returns the number of elements in the slice.
     ///
     /// # Example
     ///
@@ -757,7 +757,7 @@ impl<T> [T] {
         core_slice::SliceExt::get_unchecked_mut(self, index)
     }
 
-    /// Return an unsafe mutable pointer to the slice's buffer.
+    /// Returns an unsafe mutable pointer to the slice's buffer.
     ///
     /// The caller must ensure that the slice outlives the pointer this
     /// function returns, or else it will end up pointing to garbage.
@@ -984,7 +984,7 @@ impl<T> [T] {
         core_slice::SliceExt::ends_with(self, needle)
     }
 
-    /// Convert `self` into a vector without clones or allocation.
+    /// Converts `self` into a vector without clones or allocation.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn into_vec(self: Box<Self>) -> Vec<T> {
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 98f2933effc..e1da8b3b3bc 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -1248,7 +1248,7 @@ impl str {
         core_str::StrExt::trim_right_matches(&self[..], pat)
     }
 
-    /// Check that `index`-th byte lies at the start and/or end of a
+    /// Checks that `index`-th byte lies at the start and/or end of a
     /// UTF-8 code point sequence.
     ///
     /// The start and end of the string (when `index == self.len()`) are
@@ -1435,7 +1435,7 @@ impl str {
         core_str::StrExt::char_at_reverse(&self[..], i)
     }
 
-    /// Convert `self` to a byte slice.
+    /// Converts `self` to a byte slice.
     ///
     /// # Examples
     ///
@@ -1591,7 +1591,7 @@ impl str {
         core_str::StrExt::subslice_offset(&self[..], inner)
     }
 
-    /// Return an unsafe pointer to the `&str`'s buffer.
+    /// Returns an unsafe pointer to the `&str`'s buffer.
     ///
     /// The caller must ensure that the string outlives this pointer, and
     /// that it is not
@@ -1609,7 +1609,7 @@ impl str {
         core_str::StrExt::as_ptr(&self[..])
     }
 
-    /// Return an iterator of `u16` over the string encoded as UTF-16.
+    /// Returns an iterator of `u16` over the string encoded as UTF-16.
     #[unstable(feature = "collections",
                reason = "this functionality may only be provided by libunicode")]
     pub fn utf16_units(&self) -> Utf16Units {
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 441d0f2c5df..c3266ea2948 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -347,7 +347,7 @@ impl String {
         String { vec: bytes }
     }
 
-    /// Return the underlying byte buffer, encoded as UTF-8.
+    /// Returns the underlying byte buffer, encoded as UTF-8.
     ///
     /// # Examples
     ///
@@ -363,7 +363,7 @@ impl String {
         self.vec
     }
 
-    /// Extract a string slice containing the entire string.
+    /// Extracts a string slice containing the entire string.
     #[inline]
     #[unstable(feature = "convert",
                reason = "waiting on RFC revision")]
@@ -607,7 +607,7 @@ impl String {
         ch
     }
 
-    /// Insert a character into the string buffer at byte position `idx`.
+    /// Inserts a character into the string buffer at byte position `idx`.
     ///
     /// # Warning
     ///
@@ -662,7 +662,7 @@ impl String {
         &mut self.vec
     }
 
-    /// Return the number of bytes in this string.
+    /// Returns the number of bytes in this string.
     ///
     /// # Examples
     ///
@@ -705,12 +705,12 @@ impl String {
 }
 
 impl FromUtf8Error {
-    /// Consume this error, returning the bytes that were attempted to make a
+    /// Consumes this error, returning the bytes that were attempted to make a
     /// `String` with.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_bytes(self) -> Vec<u8> { self.bytes }
 
-    /// Access the underlying UTF8-error that was the cause of this error.
+    /// Accesss the underlying UTF8-error that was the cause of this error.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn utf8_error(&self) -> Utf8Error { self.error }
 }
@@ -959,7 +959,7 @@ impl<'a> Deref for DerefString<'a> {
     }
 }
 
-/// Convert a string slice to a wrapper type providing a `&String` reference.
+/// Converts a string slice to a wrapper type providing a `&String` reference.
 ///
 /// # Examples
 ///
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 240a55181de..4fa91a6a16a 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -393,7 +393,7 @@ impl<T> Vec<T> {
         }
     }
 
-    /// Convert the vector into Box<[T]>.
+    /// Converts the vector into Box<[T]>.
     ///
     /// Note that this will drop any excess capacity. Calling this and
     /// converting back to a vector with `into_vec()` is equivalent to calling
@@ -434,7 +434,7 @@ impl<T> Vec<T> {
         }
     }
 
-    /// Extract a slice containing the entire vector.
+    /// Extracts a slice containing the entire vector.
     #[inline]
     #[unstable(feature = "convert",
                reason = "waiting on RFC revision")]
@@ -1936,7 +1936,7 @@ impl<'a, T> Drop for DerefVec<'a, T> {
     }
 }
 
-/// Convert a slice to a wrapper type providing a `&Vec<T>` reference.
+/// Converts a slice to a wrapper type providing a `&Vec<T>` reference.
 #[unstable(feature = "collections")]
 pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> {
     unsafe {
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 49b0c229215..a66cde81c8b 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -481,7 +481,7 @@ impl<T> VecDeque<T> {
         }
     }
 
-    /// Shorten a ringbuf, dropping excess elements from the back.
+    /// Shortens a ringbuf, dropping excess elements from the back.
     ///
     /// If `len` is greater than the ringbuf's current length, this has no
     /// effect.
diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs
index 3d9d8cf51ec..cb86e4ab38d 100644
--- a/src/libcollections/vec_map.rs
+++ b/src/libcollections/vec_map.rs
@@ -452,7 +452,7 @@ impl<V> VecMap<V> {
         Drain { iter: self.v.drain().enumerate().filter_map(filter) }
     }
 
-    /// Return the number of elements in the map.
+    /// Returns the number of elements in the map.
     ///
     /// # Examples
     ///
@@ -470,7 +470,7 @@ impl<V> VecMap<V> {
         self.v.iter().filter(|elt| elt.is_some()).count()
     }
 
-    /// Return true if the map contains no elements.
+    /// Returns true if the map contains no elements.
     ///
     /// # Examples
     ///