Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
docs: tidy up documentation a bit. Make two doc-tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeron committed Mar 1, 2020
1 parent 66efe19 commit 2c4486b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ yet. Patches are welcome!

- Bit operations
- `num_traits::ops::checked` traits
- `num_integer::Integer`
- `num_traits::Num` (easy?)
- `num_traits::One` (easy?)
- `std::iter::Product`
- `num_integer::Roots`
- `num_traits::Signed`
- `std::iter::Sum`
- `num_traits::Unsigned`
- `num_integer::Integer`
- `num_integer::Roots`
- `std::iter::Product`
- `std::iter::Sum`
- Other methods implemented directly on BigInt, BigUint

I probably also want conversions from/to 16-bit and 8-bit types.

## Not done and seems hard:

- `num_traits::pow::Pow`
Expand Down
22 changes: 13 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@
//!
//! - Bit operations
//! - [`num_traits::ops::checked`] traits
//! - [`num_integer::Integer`]
//! - [`num_traits::Num`] (easy?)
//! - [`num_traits::One`] (easy?)
//! - [`std::iter::Product`]
//! - [`num_integer::Roots`]
//! - [`num_traits::Signed`]
//! - [`std::iter::Sum`]
//! - [`num_traits::Unsigned`]
//! - [`num_integer::Integer`]
//! - [`num_integer::Roots`]
//! - [`std::iter::Product`]
//! - [`std::iter::Sum`]
//! - Other methods implemented directly on BigInt, BigUint
//!
//! I probably also want conversions from/to 16-bit and 8-bit types.
//!
//! ## Not done and seems hard:
//!
//! - [`num_traits::pow::Pow`]
use either::{Either, Left, Right};
use num_bigint::{BigInt, BigUint, ParseBigIntError, ToBigUint};
use num_traits::cast::*;
use num_traits::cast::{FromPrimitive, ToPrimitive};
use std::borrow::Borrow;
use std::borrow::Cow::{self, *};
use std::borrow::Cow::{self, Borrowed, Owned};
use std::convert::{From, Into, TryFrom, TryInto};
use std::fmt::Display;
use std::hash::{Hash, Hasher};
use std::ops::*;
use std::ops::{
Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Rem, RemAssign, Sub, SubAssign,
};

use std::str::FromStr;

Expand Down Expand Up @@ -76,6 +76,8 @@ impl Uint {
/// automatically figure out the lifetimes.
///
/// ```rust
/// # use smallbigint::Uint; use num_bigint::BigUint;
/// # use std::borrow::Borrow;
/// # let x = Uint::small(42);
/// let x1 = x.cow_big();
/// let x2 : &BigUint = x1.borrow();
Expand Down Expand Up @@ -126,6 +128,8 @@ impl Int {
/// automatically figure out the lifetimes.
///
/// ```rust
/// # use smallbigint::Int; use num_bigint::BigInt;
/// # use std::borrow::Borrow;
/// # let x = Int::small(42);
/// let x1 = x.cow_big();
/// let x2 : &BigInt = x1.borrow();
Expand Down

0 comments on commit 2c4486b

Please sign in to comment.