vhost: fix clippy deprecating feature = "cargo-clippy"

The latest toolchain update in rust-vmm-ci caused the following
error:

  error: unexpected `cfg` condition value: `cargo-clippy`
     --> vhost/src/vhost_user/message.rs:758:16
      |
  758 |     #[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_conversion))]
      |                ^^^^^^^^^^^^^^^^^^^^^^^^
      |

As suggested in [1], today is no longer needed to check the
`cargo-clippy` feature (which has been deprecated), but we can
just use `#[allow(clippy::lint_name)]`.

[1] https://blog.rust-lang.org/2024/02/28/Clippy-deprecating-feature-cargo-clippy.html

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
Stefano Garzarella 2024-09-03 10:19:30 +02:00
parent c1e1ba2bf9
commit 9442110f98
2 changed files with 2 additions and 2 deletions

View file

@ -550,7 +550,7 @@ impl<H: MsgHeader> Endpoint<H> {
/// * - SocketError: other socket related errors.
/// * - PartialMessage: received a partial message.
/// * - InvalidMessage: received a invalid message.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::type_complexity))]
#[allow(clippy::type_complexity)]
pub fn recv_payload_into_buf<T: ByteValued + Sized + VhostUserMsgValidator + Default>(
&mut self,
buf: &mut [u8],

View file

@ -755,7 +755,7 @@ impl VhostUserVringAddr {
}
/// Create a new instance from `VringConfigData`.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_conversion))]
#[allow(clippy::useless_conversion)]
pub fn from_config_data(index: u32, config_data: &VringConfigData) -> Self {
let log_addr = config_data.log_addr.unwrap_or(0);
VhostUserVringAddr {