Skip to content

Mismatched types for generated struct duration #5

@IRSMsoso

Description

@IRSMsoso

format!() in build.rs strips the decimal place if the duration is a whole number, which results in the number being interpreted as an i32 in the struct definition. In build.rs line 537.

error[E0308]: mismatched types
    |
151 |             duration: 16,
    |                       ^^ expected `f32`, found integer
    |
help: use a float literal
    |
151 |             duration: 16.0,
    |                         ++

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