From d904c72af830bd4bec773ce35897703dff2ee3b1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 18 Jun 2013 14:45:18 -0700 Subject: replace #[inline(always)] with #[inline]. r=burningtree. --- src/libstd/hashmap.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/libstd/hashmap.rs') diff --git a/src/libstd/hashmap.rs b/src/libstd/hashmap.rs index 85156d6996d..d05fa63a6f9 100644 --- a/src/libstd/hashmap.rs +++ b/src/libstd/hashmap.rs @@ -59,7 +59,7 @@ enum SearchResult { FoundEntry(uint), FoundHole(uint), TableFull } -#[inline(always)] +#[inline] fn resize_at(capacity: uint) -> uint { ((capacity as float) * 3. / 4.) as uint } @@ -85,19 +85,19 @@ fn linear_map_with_capacity_and_keys( } impl HashMap { - #[inline(always)] + #[inline] fn to_bucket(&self, h: uint) -> uint { // A good hash function with entropy spread over all of the // bits is assumed. SipHash is more than good enough. h % self.buckets.len() } - #[inline(always)] + #[inline] fn next_bucket(&self, idx: uint, len_buckets: uint) -> uint { (idx + 1) % len_buckets } - #[inline(always)] + #[inline] fn bucket_sequence(&self, hash: uint, op: &fn(uint) -> bool) -> bool { let start_idx = self.to_bucket(hash); @@ -112,20 +112,20 @@ impl HashMap { } } - #[inline(always)] + #[inline] fn bucket_for_key(&self, k: &K) -> SearchResult { let hash = k.hash_keyed(self.k0, self.k1) as uint; self.bucket_for_key_with_hash(hash, k) } - #[inline(always)] + #[inline] fn bucket_for_key_equiv>(&self, k: &Q) -> SearchResult { let hash = k.hash_keyed(self.k0, self.k1) as uint; self.bucket_for_key_with_hash_equiv(hash, k) } - #[inline(always)] + #[inline] fn bucket_for_key_with_hash(&self, hash: uint, k: &K) @@ -141,7 +141,7 @@ impl HashMap { TableFull } - #[inline(always)] + #[inline] fn bucket_for_key_with_hash_equiv>(&self, hash: uint, k: &Q) @@ -161,7 +161,7 @@ impl HashMap { /// Expand the capacity of the array to the next power of two /// and re-insert each of the existing buckets. - #[inline(always)] + #[inline] fn expand(&mut self) { let new_capacity = self.buckets.len() * 2; self.resize(new_capacity); @@ -190,7 +190,7 @@ impl HashMap { } } - #[inline(always)] + #[inline] fn value_for_bucket<'a>(&'a self, idx: uint) -> &'a V { match self.buckets[idx] { Some(ref bkt) => &bkt.value, @@ -198,7 +198,7 @@ impl HashMap { } } - #[inline(always)] + #[inline] fn mut_value_for_bucket<'a>(&'a mut self, idx: uint) -> &'a mut V { match self.buckets[idx] { Some(ref mut bkt) => &mut bkt.value, -- cgit 1.4.1-3-g733a5