Skip to content

v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Ballasi Ballasi released this 27 Mar 17:40
· 37 commits to master since this release
91e5858

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 to Num2Err 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.