vec: rm redundant is_empty implementations
This commit is contained in:
@@ -691,12 +691,6 @@ impl<T> Vector<T> for @[T] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'self, T> Container for &'self [T] {
|
impl<'self, T> Container for &'self [T] {
|
||||||
/// Returns true if a vector contains no elements
|
|
||||||
#[inline]
|
|
||||||
fn is_empty(&self) -> bool {
|
|
||||||
self.as_imm_buf(|_p, len| len == 0u)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the length of a vector
|
/// Returns the length of a vector
|
||||||
#[inline]
|
#[inline]
|
||||||
fn len(&self) -> uint {
|
fn len(&self) -> uint {
|
||||||
@@ -705,12 +699,6 @@ impl<'self, T> Container for &'self [T] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Container for ~[T] {
|
impl<T> Container for ~[T] {
|
||||||
/// Returns true if a vector contains no elements
|
|
||||||
#[inline]
|
|
||||||
fn is_empty(&self) -> bool {
|
|
||||||
self.as_imm_buf(|_p, len| len == 0u)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the length of a vector
|
/// Returns the length of a vector
|
||||||
#[inline]
|
#[inline]
|
||||||
fn len(&self) -> uint {
|
fn len(&self) -> uint {
|
||||||
|
|||||||
Reference in New Issue
Block a user