Skip to content

Shouldn't Int translate to an i32? #266

Open
@Luro02

Description

@Luro02

In the documentation it says, that an Int is an i32

Int: A signed 32‐bit integer.

but rust tells me, that an i64 is generated?

error[E0308]: mismatched types
  --> src/main.rs:30:22
   |
30 |             id: Some(id),
   |                      ^^ expected i64, found usize
help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit
   |
30 |             id: Some(id.try_into().unwrap()),
   |                      ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: Could not compile `anilist_unofficial`.

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions