Re: [libgpiod][PATCH] bindings: rust: fix clippy lint warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 14, 2023 at 10:14:08AM +0200, Erik Schilling wrote:
> On Mon Jun 12, 2023 at 5:40 PM CEST, Kent Gibson wrote:
> > clippy from Rust 1.70 reports a host of warnings due to casting and type
> > conversions across the FFI interface to libgpiod.
> > These casts and conversions are required to support old versions of Rust
> > that do not support recent Rust FFI extensions.
> 
> Could you elaborate which extensions are relevant here? Would it be
> realistic to just update the minimum Rust version instead of needing
> to include these suppression directives?
> 

Types were added in core::ffi[1] in 1.64 for just this purpose.
e.g. c_uint[2]
Though c_size_t[3] still remains in Experimental.

And I guess the clippy lints followed soon after.

Wrt setting the MSRV, but I assumed not, hence the allows.

Cheers,
Kent.

[1] https://doc.rust-lang.org/stable/core/ffi/index.html
[2] https://doc.rust-lang.org/stable/core/ffi/type.c_uint.html
[3] https://doc.rust-lang.org/stable/core/ffi/type.c_size_t.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux