diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libextra/crypto | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
| download | rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libextra/crypto')
| -rw-r--r-- | src/libextra/crypto/cryptoutil.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libextra/crypto/cryptoutil.rs b/src/libextra/crypto/cryptoutil.rs index f4bc87ae763..97b82383d84 100644 --- a/src/libextra/crypto/cryptoutil.rs +++ b/src/libextra/crypto/cryptoutil.rs @@ -109,23 +109,23 @@ impl ToBits for u64 { } } -/// Adds the specified number of bytes to the bit count. fail2!() if this would cause numeric +/// Adds the specified number of bytes to the bit count. fail!() if this would cause numeric /// overflow. pub fn add_bytes_to_bits<T: Int + CheckedAdd + ToBits>(bits: T, bytes: T) -> T { let (new_high_bits, new_low_bits) = bytes.to_bits(); if new_high_bits > Zero::zero() { - fail2!("Numeric overflow occured.") + fail!("Numeric overflow occured.") } match bits.checked_add(&new_low_bits) { Some(x) => return x, - None => fail2!("Numeric overflow occured.") + None => fail!("Numeric overflow occured.") } } /// Adds the specified number of bytes to the bit count, which is a tuple where the first element is -/// the high order value. fail2!() if this would cause numeric overflow. +/// the high order value. fail!() if this would cause numeric overflow. pub fn add_bytes_to_bits_tuple <T: Int + Unsigned + CheckedAdd + ToBits> (bits: (T, T), bytes: T) -> (T, T) { @@ -144,7 +144,7 @@ pub fn add_bytes_to_bits_tuple } else { match hi.checked_add(&new_high_bits) { Some(y) => return (y, x), - None => fail2!("Numeric overflow occured.") + None => fail!("Numeric overflow occured.") } } }, @@ -152,7 +152,7 @@ pub fn add_bytes_to_bits_tuple let one: T = One::one(); let z = match new_high_bits.checked_add(&one) { Some(w) => w, - None => fail2!("Numeric overflow occured.") + None => fail!("Numeric overflow occured.") }; match hi.checked_add(&z) { // This re-executes the addition that was already performed earlier when overflow @@ -163,7 +163,7 @@ pub fn add_bytes_to_bits_tuple // be Unsigned - overflow is not defined for Signed types. This function could be // implemented for signed types as well if that were needed. Some(y) => return (y, low + new_low_bits), - None => fail2!("Numeric overflow occured.") + None => fail!("Numeric overflow occured.") } } } |
