Skip to content

Dependency on std is too strong #164

@stephanemagnenat

Description

@stephanemagnenat

Currently, some features depend on std, such as the re-exporting of num_trait's Float (from here):

#[cfg(feature = "std")]
pub use num_traits::{Float, Pow};

However, num_trait has the ability to export these using libm even under no_std (from here):

#[cfg(any(feature = "std", feature = "libm"))]
pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
...

I think that it would be good for ordered-float to do the same, enabling a wider use of its feature set under no_std.

Does the maintainer agree?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions