circlejerk 0.1.0

Small arithmetic helpers for Rust
Documentation
//! Small arithmetic helpers.

/// Adds two unsigned 64-bit integers.
///
/// # Examples
///
/// ```
/// assert_eq!(circlejerk::add(2, 2), 4);
/// ```
///
/// # Panics
///
/// Panics on integer overflow when overflow checks are enabled.
#[must_use]
pub fn add(left: u64, right: u64) -> u64 {
    left + right
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        let result = add(2, 2);
        assert_eq!(result, 4);
    }
}