v0.3.0
Pre-release
Pre-release
What's new?
- Usage of specific functions rather than
.output()
. This makes the whole code easier to read and build.
Example:
use num2words::{Num2Words, Output};
assert_eq!(
Num2Words::new(42).output(Output::Ordinal).to_words(),
Ok(String::from("forty-second"))
);
becomes
use num2words::Num2Words;
assert_eq!(
Num2Words::new(42).ordinal().to_words(),
Ok(String::from("forty-second"))
);
- Add
Display
trait toNum2Err
as this may be useful for any usages (e.g., the binary provided with the library) - Update the binary to the new code structure
- Enable the binary to output to
stderr
when providing an error
Full changelog
Here is the full changelog.