diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2013-06-18 14:45:18 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2013-06-18 14:48:48 -0700 |
| commit | d904c72af830bd4bec773ce35897703dff2ee3b1 (patch) | |
| tree | c9253d1282f12af3aac7e854cd1115cd2eede863 /src/libstd/at_vec.rs | |
| parent | 303d7bfc87ca370354ac4264cc23a80cbcd8a792 (diff) | |
replace #[inline(always)] with #[inline]. r=burningtree.
Diffstat (limited to 'src/libstd/at_vec.rs')
| -rw-r--r-- | src/libstd/at_vec.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/at_vec.rs b/src/libstd/at_vec.rs index 56646eb4bfb..3875847ff9b 100644 --- a/src/libstd/at_vec.rs +++ b/src/libstd/at_vec.rs @@ -38,7 +38,7 @@ pub mod rustrt { } /// Returns the number of elements the vector can hold without reallocating -#[inline(always)] +#[inline] pub fn capacity<T>(v: @[T]) -> uint { unsafe { let repr: **raw::VecRepr = transmute(&v); @@ -58,7 +58,7 @@ pub fn capacity<T>(v: @[T]) -> uint { * as an argument a function that will push an element * onto the vector being constructed. */ -#[inline(always)] +#[inline] pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] { let mut vec: @[A] = @[]; unsafe { raw::reserve(&mut vec, size); } @@ -76,7 +76,7 @@ pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] { * as an argument a function that will push an element * onto the vector being constructed. */ -#[inline(always)] +#[inline] pub fn build<A>(builder: &fn(push: &fn(v: A))) -> @[A] { build_sized(4, builder) } @@ -93,7 +93,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> @[A] { * as an argument a function that will push an element * onto the vector being constructed. */ -#[inline(always)] +#[inline] pub fn build_sized_opt<A>(size: Option<uint>, builder: &fn(push: &fn(v: A))) -> @[A] { @@ -104,7 +104,7 @@ pub fn build_sized_opt<A>(size: Option<uint>, /// Iterates over the `rhs` vector, copying each element and appending it to the /// `lhs`. Afterwards, the `lhs` is then returned for use again. -#[inline(always)] +#[inline] pub fn append<T:Copy>(lhs: @[T], rhs: &const [T]) -> @[T] { do build_sized(lhs.len() + rhs.len()) |push| { for lhs.each |x| { push(copy *x); } @@ -178,7 +178,7 @@ pub mod traits { use ops::Add; impl<'self,T:Copy> Add<&'self const [T],@[T]> for @[T] { - #[inline(always)] + #[inline] fn add(&self, rhs: & &'self const [T]) -> @[T] { append(*self, (*rhs)) } @@ -208,7 +208,7 @@ pub mod raw { * modifing its buffers, so it is up to the caller to ensure that * the vector is actually the specified size. */ - #[inline(always)] + #[inline] pub unsafe fn set_len<T>(v: @[T], new_len: uint) { let repr: **mut VecRepr = transmute(&v); (**repr).unboxed.fill = new_len * sys::size_of::<T>(); @@ -217,7 +217,7 @@ pub mod raw { /** * Pushes a new value onto this vector. */ - #[inline(always)] + #[inline] pub unsafe fn push<T>(v: &mut @[T], initval: T) { let repr: **VecRepr = transmute_copy(&v); let fill = (**repr).unboxed.fill; @@ -228,7 +228,7 @@ pub mod raw { } } - #[inline(always)] // really pretty please + #[inline] // really pretty please unsafe fn push_fast<T>(v: &mut @[T], initval: T) { let repr: **mut VecRepr = ::cast::transmute(v); let fill = (**repr).unboxed.fill; |
