Skip to content

unnecessary_cast for u8 as c_char on some platforms #6331

Closed
@glandium

Description

@glandium

On many platforms, c_char is an alias for i8. On some others, though, it's u8.

So when you have code like

const FOO: std::os::raw::c_char = b'f' as std::os::raw::c_char; 

which is necessary on those many platforms, clippy complains when run on one of those other platforms (e.g. aarch64 linux).

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