From f14f1b647bfa1149a149fe540406aa7ecc3b1492 Mon Sep 17 00:00:00 2001 From: Olga Botvinnik Date: Mon, 30 Sep 2024 12:32:29 -0700 Subject: [PATCH 1/3] Add explanation of how to enable `maths` feature Hello, --- src/maths.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/maths.rs b/src/maths.rs index 6345d20..9fbdb49 100644 --- a/src/maths.rs +++ b/src/maths.rs @@ -48,7 +48,8 @@ const FACTORIAL: [Decimal; 28] = [ ]; /// Trait exposing various mathematical operations that can be applied using a Decimal. This is only -/// present when the `maths` feature has been enabled. +/// present when the `maths` feature has been enabled, e.g. by adding the crate with +// `cargo add rust_decimal --features maths` and importing in your Rust file with `use rust_decimal::maths::MathematicalOps;` pub trait MathematicalOps { /// The estimated exponential function, ex. Stops calculating when it is within /// tolerance of roughly `0.0000002`. From 9e3195bd6af001f6fbb92793b10da8251212899f Mon Sep 17 00:00:00 2001 From: Olga Botvinnik Date: Mon, 30 Sep 2024 12:36:47 -0700 Subject: [PATCH 2/3] maths is private: rust_decimal::maths::MathematicalOps -> rust_decimal::MathematicalOps --- src/maths.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maths.rs b/src/maths.rs index 9fbdb49..d07053c 100644 --- a/src/maths.rs +++ b/src/maths.rs @@ -49,7 +49,7 @@ const FACTORIAL: [Decimal; 28] = [ /// Trait exposing various mathematical operations that can be applied using a Decimal. This is only /// present when the `maths` feature has been enabled, e.g. by adding the crate with -// `cargo add rust_decimal --features maths` and importing in your Rust file with `use rust_decimal::maths::MathematicalOps;` +// `cargo add rust_decimal --features maths` and importing in your Rust file with `use rust_decimal::MathematicalOps;` pub trait MathematicalOps { /// The estimated exponential function, ex. Stops calculating when it is within /// tolerance of roughly `0.0000002`. From 03eb303f8b2c719c7a74f81996a13d03d27c5907 Mon Sep 17 00:00:00 2001 From: Olga Botvinnik Date: Tue, 8 Oct 2024 18:47:46 +0000 Subject: [PATCH 3/3] Run --- src/maths.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maths.rs b/src/maths.rs index d07053c..c9c4cba 100644 --- a/src/maths.rs +++ b/src/maths.rs @@ -48,7 +48,7 @@ const FACTORIAL: [Decimal; 28] = [ ]; /// Trait exposing various mathematical operations that can be applied using a Decimal. This is only -/// present when the `maths` feature has been enabled, e.g. by adding the crate with +/// present when the `maths` feature has been enabled, e.g. by adding the crate with // `cargo add rust_decimal --features maths` and importing in your Rust file with `use rust_decimal::MathematicalOps;` pub trait MathematicalOps { /// The estimated exponential function, ex. Stops calculating when it is within