Re: [PATCH] rust: cast to the proper type
From: FUJITA Tomonori
Date: Wed Jun 11 2025 - 20:49:55 EST
On Wed, 11 Jun 2025 09:41:08 -0400
Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>> > > + DuplexMode::Full => bindings::DUPLEX_FULL,
>> > > + DuplexMode::Half => bindings::DUPLEX_HALF,
>> > > + DuplexMode::Unknown => bindings::DUPLEX_UNKNOWN,
>> > > + } as crate::ffi::c_int;
>> >
>> > This file imports the prelude, so this can just be c_int without the
>> > crate::ffI:: path.
>>
>> This has come up a few times now; should we consider denying
>> unused_qualifications?
>>
>> https://doc.rust-lang.org/stable/nightly-rustc/rustc_lint/builtin/static.UNUSED_QUALIFICATIONS.html
>
> I should point out also that every reference to crate::ffi::c_int in
> this file is fully qualified, so I think this should be a separate
> change.
I can take care of this file.
Thanks,