From c3c5e6c77388f3f81449c668e6a97b064cf41852 Mon Sep 17 00:00:00 2001 From: Roy Frostig Date: Thu, 26 Aug 2010 11:57:14 -0700 Subject: Workaround issue #152 in _uint.next_power_of_two --- src/lib/_uint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/_uint.rs b/src/lib/_uint.rs index f3a6f935..2c2629c9 100644 --- a/src/lib/_uint.rs +++ b/src/lib/_uint.rs @@ -28,7 +28,9 @@ fn next_power_of_two(uint n) -> uint { let uint shift = 1u; while (shift <= halfbits) { tmp |= tmp >> shift; - shift <<= 1u; + // FIXME (issue #152): This would be just a tad cuter if it were + // shift <<= 1u + shift = shift << 1u; } ret tmp + 1u; } -- cgit v1.2.3