diff options
| author | Paul Woolcock <pwoolcoc+github@gmail.com> | 2012-01-29 21:33:08 -0500 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-30 18:21:01 +0100 |
| commit | e1251f7b0045281123dcbb1ffc80320b324bd814 (patch) | |
| tree | 3cfcc51c163d2450c41c2e59621131478ec9177f /src/libstd | |
| parent | e1f15a71e3dc1d24454594e068ed3df2271448e3 (diff) | |
| download | rust-e1251f7b0045281123dcbb1ffc80320b324bd814.tar.gz rust-e1251f7b0045281123dcbb1ffc80320b324bd814.zip | |
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.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/md4.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
