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/bool.rs | |
| parent | 303d7bfc87ca370354ac4264cc23a80cbcd8a792 (diff) | |
| download | rust-d904c72af830bd4bec773ce35897703dff2ee3b1.tar.gz rust-d904c72af830bd4bec773ce35897703dff2ee3b1.zip | |
replace #[inline(always)] with #[inline]. r=burningtree.
Diffstat (limited to 'src/libstd/bool.rs')
| -rw-r--r-- | src/libstd/bool.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/bool.rs b/src/libstd/bool.rs index 66a5bfa944f..e6be164099b 100644 --- a/src/libstd/bool.rs +++ b/src/libstd/bool.rs @@ -212,7 +212,7 @@ impl FromStr for bool { * ~~~ */ impl ToStr for bool { - #[inline(always)] + #[inline] fn to_str(&self) -> ~str { if *self { ~"true" } else { ~"false" } } @@ -250,24 +250,24 @@ pub fn all_values(blk: &fn(v: bool)) { * 0 * ~~~ */ -#[inline(always)] +#[inline] pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } } #[cfg(not(test))] impl Ord for bool { - #[inline(always)] + #[inline] fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) } - #[inline(always)] + #[inline] fn le(&self, other: &bool) -> bool { to_bit(*self) <= to_bit(*other) } - #[inline(always)] + #[inline] fn gt(&self, other: &bool) -> bool { to_bit(*self) > to_bit(*other) } - #[inline(always)] + #[inline] fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) } } #[cfg(not(test))] impl TotalOrd for bool { - #[inline(always)] + #[inline] fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) } } @@ -298,9 +298,9 @@ impl TotalOrd for bool { */ #[cfg(not(test))] impl Eq for bool { - #[inline(always)] + #[inline] fn eq(&self, other: &bool) -> bool { (*self) == (*other) } - #[inline(always)] + #[inline] fn ne(&self, other: &bool) -> bool { (*self) != (*other) } } |
