qemu-cr16/rust/qemu-api/src
Michael S. Tsirkin 4bf06bcf07 rust: bindings: allow any number of params
We are going to be adding more parameters, and this makes
rust unhappy:
    Functions with lots of parameters are considered bad style and reduce
    readability (“what does the 5th parameter mean?”). Consider grouping
    some parameters into a new type.

Specifically:

error: this function has too many arguments (8/7)
    --> /builds/mstredhat/qemu/build/rust/qemu-api/rust-qemu-api-tests.p/structured/bindings.inc.rs:3840:5
     |
3840 | /     pub fn new_bitfield_1(
3841 | |         secure: std::os::raw::c_uint,
3842 | |         space: std::os::raw::c_uint,
3843 | |         user: std::os::raw::c_uint,
...    |
3848 | |         address_type: std::os::raw::c_uint,
3849 | |     ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
     | |____________________________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
     = note: `-D clippy::too-many-arguments` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::too_many_arguments)]`

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <e41344bd22248b0883752ef7a7c459090a3d9cfc.1752560127.git.mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-07-15 02:56:39 -04:00
..
assertions.rs rust: assertions: Support index field wrapped in BqlCell 2025-05-02 17:37:46 +02:00
bindings.rs rust: bindings: allow any number of params 2025-07-15 02:56:39 -04:00
bitops.rs rust: Fix Zhao's email address 2025-05-26 18:04:27 +02:00
callbacks.rs rust: callbacks: allow passing optional callbacks as () 2025-02-13 12:19:33 +01:00
cell.rs rust: cell: remove support for running doctests with "cargo test --doc" 2025-06-03 22:42:18 +02:00
chardev.rs rust: enable clippy::ptr_cast_constness 2025-05-06 16:02:04 +02:00
errno.rs rust: add module to convert between success/-errno and io::Result 2025-02-25 16:18:08 +01:00
error.rs rust: qemu-api: add tests for Error bindings 2025-06-05 20:24:51 +02:00
irq.rs rust: use std::ffi instead of std::os::raw 2025-05-06 16:02:04 +02:00
lib.rs rust/qemu-api: Add initial logging support based on C API 2025-06-20 13:25:59 +02:00
log.rs rust/qemu-api: Add initial logging support based on C API 2025-06-20 13:25:59 +02:00
memory.rs rust: qom: change instance_init to take a ParentInit<> 2025-06-17 09:54:52 +02:00
module.rs rust: rename qemu-api modules to follow C code a bit more 2024-12-19 19:36:37 +01:00
prelude.rs rust/qemu-api: Add initial logging support based on C API 2025-06-20 13:25:59 +02:00
qdev.rs rust: qom: change instance_init to take a ParentInit<> 2025-06-17 09:54:52 +02:00
qom.rs rust: qom: change instance_init to take a ParentInit<> 2025-06-17 09:54:52 +02:00
sysbus.rs rust: sysbus: wrap SysBusDevice with Opaque<> 2025-03-06 12:44:47 +01:00
timer.rs rust: Fix Zhao's email address 2025-05-26 18:04:27 +02:00
uninit.rs rust: qemu_api: introduce MaybeUninit field projection 2025-06-17 09:54:51 +02:00
vmstate.rs rust: Fix the typos in doc 2025-05-26 18:04:27 +02:00
zeroable.rs rust: use MaybeUninit::zeroed() in const context 2025-05-06 16:02:04 +02:00