Commit Graph

4 Commits

Author SHA1 Message Date
Tobin C. Harding 3e332c3839
amount: Fix docs on FromStr
The docs on `FromStr` say "string slice is zero" but actually mean to
document the behaviour when the value represented is zero.

Also the fact that `FromStr` returns an error if parsing fails is self
evident.
2024-11-05 07:49:35 +11:00
Tobin C. Harding 5bec76aa51
amount: Fix rustdocs
Fix the rustdocs on `Amount` and `SignedAmount` by doing:

- Make them uniform
- Use correct style (looks like `SignedAmount` got left behind when we
  improved `Amount`)
2024-11-05 07:49:35 +11:00
Tobin C. Harding 42e5043b33
Add from_int_btc group of functions
Add/update the from_int group of functions to provide one that errors
and one that is const and panics (errors in const context are not useful
because one cannot call `unwrap` in const context).
2024-11-02 10:19:03 +11:00
Tobin C. Harding d4d9311603
amount: Move SignedAmount to private signed module
In an effort to make the `amount` module more readable move the
`SignedAmount` type to a private submodule.

Re-export everything so this is not a breaking change.

Code move and re-exports only.
2024-10-31 12:57:08 +11:00