malachite-nz 0.3.2

The bignum types Natural and Integer, with efficient algorithms partially derived from GMP and FLINT
Documentation
use malachite_nz::natural::Natural;

#[test]
fn test_from_bool() {
    let test = |b, s| {
        let n = Natural::from(b);
        assert!(n.is_valid());
        assert_eq!(n.to_string(), s);
    };
    test(false, "0");
    test(true, "1");
}