diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2025-07-14 16:42:12 -0400 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-15 02:56:39 -0400 |
| commit | 4bf06bcf072968c702712ed7fcb2a53f5a252216 (patch) | |
| tree | 3fbd231911c9ff608915f328366fe511881afe8f /rust/qemu-api/src/module.rs | |
| parent | da77fc6c2e28a17249a6f459213247720e22e170 (diff) | |
| download | focaccia-qemu-4bf06bcf072968c702712ed7fcb2a53f5a252216.tar.gz focaccia-qemu-4bf06bcf072968c702712ed7fcb2a53f5a252216.zip | |
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>
Diffstat (limited to 'rust/qemu-api/src/module.rs')
0 files changed, 0 insertions, 0 deletions