Skip to content

crate fails to comile on 32-bit architectures #5

@decathorpe

Description

@decathorpe

Trying to build this crate on fedora fails on 32-bit architectures (armv7hl and i686) with this error:

   --> src/lib.rs:108:8
    |
108 |         Some(rlim.rlim_cur)
    |              ^^^^^^^^^^^^^
    |              |
    |              expected `u64`, found `u32`
    |              help: you can convert an `u32` to `u64`: `rlim.rlim_cur.into()`

This error (and that it only occurs on 32-bit architectures) makes me think that this is an instance of where using usize would be appropriate, since it's the architecture-dependent integer type (4 bytes ~ u32 on 32-bit architectures, and 8 bytes ~ u64 on 64-bit architectures, according to the rust docs).

Metadata

Metadata

Assignees

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