cloud-hypervisor/vhost_user_block/src
Rob Bradford a2e1e13918 vhost_user_block: Use struct instantiation rather than mut variable
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>
2021-01-04 13:46:37 +01:00
..
lib.rs vhost_user_block: Use struct instantiation rather than mut variable 2021-01-04 13:46:37 +01:00
main.rs vhost_user_block: Move binary into vhost_user_block crate 2020-07-06 10:56:10 +02:00