Skip to content

Commit

Permalink
Update crate features documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Apr 26, 2024
1 parent f40ede0 commit d2f01ec
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,22 @@
//!
//! ## Crate features
//!
//! This crate currently has one feature (`std`), enabled by default. If compiled with
//! `--no-default-features` or used as a dependency with default features disabled, the crate
//! becomes `no_std` compatible. When used in `no_std` mode, the following restrictions and
//! limitations are observed:
//! The following crate features may be chosen:
//! * `std` (enabled by default)
//! * `serde`
//!
//! If compiled without the `std` feature (i.e. with `--no-default-features` or used as a dependency
//! with default features disabled), the crate becomes `no_std` compatible. When used in `no_std`
//! mode, the following restrictions and limitations are observed:
//!
//! * All formatting/stringification of `Size` types is disabled.
//! * `Size` no longer implements [`std::fmt::Display`] (`core::fmt::Debug` is still implemented).
//! * The intermediate type used for mathematical operations on `Size` types is changed from `f64`
//! to `i64` so that no implicit floating-point math is performed. To prevent inadvertent loss of
//! precision, it is forbidden to pass in floating point values to the `Size` API under `no_std`
//! mode.
//! * The ability to parse strings into `Size` objects (`Size::from_str()` and the `FromStr` impl)
//! are removed.
//!
//! ## Base-2 and Base-10 constants
//!
Expand Down

0 comments on commit d2f01ec

Please sign in to comment.