Skip to content

checking for NaN/infinity automatically #12

@BurntSushi

Description

@BurntSushi

I'm ignorant of the underlying issues here, but I missed the part in the docs for Buffer::format about the fact that it doesn't check for NaN/infinite floats for you. This led to a bug introduced on my behalf: BurntSushi/rust-csv#153

It's my fault for not reading the docs carefully, but is there a reason why this isn't handled for you automatically? In particular, the lower level APIs, such as d2s_buffered_n, do handle this for you.

It seems to me like most uses of Buffer::format will just need to wrap it in its own case analysis. If so, does it make sense to perhaps add a new API (at the same abstraction level as Buffer::format) that does the case analysis for you?

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