summaryrefslogtreecommitdiff
path: root/src/vhost_user/slave_req_handler.rs
diff options
context:
space:
mode:
authorKeiichi Watanabe <keiichiw@chromium.org>2021-02-24 21:21:32 +0900
committerJiang Liu <gerry@linux.alibaba.com>2021-03-03 19:33:56 +0800
commit62fd4ec5a47d1b9cd1ea2c8702228ea216b92686 (patch)
treeef9bb7f8b3371f8792c76058d5856cac8bc1cd31 /src/vhost_user/slave_req_handler.rs
parent576694bcfb09e7c78d812ed07dbc5377d283852a (diff)
downloadvmm_vhost-62fd4ec5a47d1b9cd1ea2c8702228ea216b92686.tar.gz
Fix clippy erros and warnings
Make `cargo clippy --all-features --all-targets` pass. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Diffstat (limited to 'src/vhost_user/slave_req_handler.rs')
-rw-r--r--src/vhost_user/slave_req_handler.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vhost_user/slave_req_handler.rs b/src/vhost_user/slave_req_handler.rs
index ff07304..3b44e4c 100644
--- a/src/vhost_user/slave_req_handler.rs
+++ b/src/vhost_user/slave_req_handler.rs
@@ -579,10 +579,7 @@ impl<S: VhostUserSlaveReqHandler> SlaveReqHandler<S> {
// invalid FD flag. This flag is set when there is no file descriptor
// in the ancillary data. This signals that polling will be used
// instead of waiting for the call.
- let nofd = match msg.value & 0x100u64 {
- 0x100u64 => true,
- _ => false,
- };
+ let nofd = (msg.value & 0x100u64) == 0x100u64;
let mut rfd = None;
match rfds {