Skip to content

Document how this should work on floats? #78

@EvanCarroll

Description

@EvanCarroll

Perhaps it's just a part of the language, but if I want to use

#[cached(time=60)]
async fn get_alerts(config: &cmdline::Config) -> Result<Vec<Alert>, reqwest::Error> {

I would expect that to work as is. The problem I'm having is that Config there contains an f64. That f64 doesn't implement Hash. I think I get how to do this, but perhaps more could be done to help the user in this case? It's kind of a pita to have to write all this code to say NaN = NaN.

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