Skip to content

Commit e1dc0d7

Browse files
committed
fix feature propagation
1 parent 24f0a1c commit e1dc0d7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ readme = "README.md"
1111
repository = "https://github.com/stencillogic/astro-float"
1212

1313
[dependencies]
14-
astro-float-num = "0.3.5"
14+
astro-float-num = { version = "0.3.5", default-features = false }
1515
astro-float-macro = "0.4.4"
1616

1717
[features]
1818
default = ["std", "random", "serde"]
19-
std = []
19+
std = ["astro-float-num/std"]
2020
random = ["astro-float-num/random"]
2121
serde = ["astro-float-num/serde"]
2222

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
//! assert_eq!(pi.cmp(&pi_lib), Some(0));
7575
//!
7676
//! // Print using decimal radix.
77+
//! #[cfg(feature="std")]
7778
//! println!("{}", pi);
7879
//!
7980
//! // output: 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458699748e+0
@@ -116,6 +117,7 @@
116117
//! assert_eq!(pi.cmp(&pi_lib), Some(0));
117118
//!
118119
//! // Print using decimal radix.
120+
//! #[cfg(feature="std")]
119121
//! println!("{}", pi);
120122
//!
121123
//! // output: 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458699748e+0
@@ -148,10 +150,10 @@ extern crate alloc;
148150
/// Macro takes into account 2 aspects.
149151
///
150152
/// 1. Code simplification. Macro simplifies code and improves its readability by allowing to specify simple and concise expression
151-
/// and process input arguments transparently.
153+
/// and process input arguments transparently.
152154
///
153155
/// 2. Error compensation. Macro compensates error caused by [catastrophic cancellation](https://en.wikipedia.org/wiki/Catastrophic_cancellation)
154-
/// and some other situations where precision can be lost by automatically increasing the working precision internally.
156+
/// and some other situations where precision can be lost by automatically increasing the working precision internally.
155157
///
156158
/// The macro does not take care of correct rounding, because the completion of the rounding algorithm in finite time depends on the macro's input.
157159
///

0 commit comments

Comments
 (0)