about summary refs log tree commit diff
path: root/src/libcore/uint-template
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-06-14 11:38:45 -0700
committerEric Holk <eric.holk@gmail.com>2012-06-21 16:11:11 -0700
commit9bdb2c9e48cefc684b6163249ca816cd96350bde (patch)
treea1f34c68a5490f86915133815c1bbf8d20de88c6 /src/libcore/uint-template
parent0e5cfd9f339c78384ef3fbcb4d230fa0bb363d54 (diff)
downloadrust-9bdb2c9e48cefc684b6163249ca816cd96350bde.tar.gz
rust-9bdb2c9e48cefc684b6163249ca816cd96350bde.zip
Library vecs are fast now.
Diffstat (limited to 'src/libcore/uint-template')
-rw-r--r--src/libcore/uint-template/uint.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/uint-template/uint.rs b/src/libcore/uint-template/uint.rs
index e1bb89c27c4..843215bd4b9 100644
--- a/src/libcore/uint-template/uint.rs
+++ b/src/libcore/uint-template/uint.rs
@@ -81,6 +81,7 @@ fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
 }
 
 #[doc = "Returns the smallest power of 2 greater than or equal to `n`"]
+#[inline(always)]
 fn next_power_of_two(n: uint) -> uint {
     let halfbits: uint = sys::size_of::<uint>() * 4u;
     let mut tmp: uint = n - 1u;