From e1251f7b0045281123dcbb1ffc80320b324bd814 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Sun, 29 Jan 2012 21:33:08 -0500 Subject: Change all ternary ops to if/then/else All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression. --- src/libstd/md4.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/md4.rs b/src/libstd/md4.rs index 7b5320a5dfc..1d6540f04e8 100644 --- a/src/libstd/md4.rs +++ b/src/libstd/md4.rs @@ -65,7 +65,7 @@ fn md4(msg: [u8]) -> {a: u32, b: u32, c: u32, d: u32} { let j = 0u, q = 0x6ed9eba1u32; while j < 8u { - let jj = j > 2u ? j - 3u : j; + let jj = if j > 2u { j - 3u } else { j }; a = rot(3, a + (b ^ c ^ d) + x[jj] + q); d = rot(9, d + (a ^ b ^ c) + x[jj + 8u] + q); c = rot(11, c + (d ^ a ^ b) + x[jj + 4u] + q); -- cgit 1.4.1-3-g733a5