mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-22 07:51:16 +00:00
error: field assignment outside of initializer for an instance created with Default::default() --> vhost_user_block/src/lib.rs:223:9 | 223 | config.capacity = nsectors; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D clippy::field-reassign-with-default` implied by `-D warnings` note: consider initializing the variable with `block_util::VirtioBlockConfig { capacity: nsectors, blk_size: BLK_SIZE, size_max: 65535, seg_max: 128 - 2, min_io_size: 1, opt_io_size: 1, num_queues: num_queues as u16, writeback: 1, ..Default::default() }` and removing relevant reassignments --> vhost_user_block/src/lib.rs:221:9 | 221 | let mut config = VirtioBlockConfig::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default Signed-off-by: Rob Bradford <robert.bradford@intel.com> |
||
---|---|---|
.. | ||
lib.rs | ||
main.rs |