clippy: Resolve option_map_unit_fn

TEST=bin/clippy

Change-Id: I814cfce68c147f63d96fce6d0c465488ad3e336a
Reviewed-on: https://chromium-review.googlesource.com/1566744
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
David Tolnay 2019-04-12 19:18:32 -07:00 committed by chrome-bot
parent 9239602d69
commit 56c2d3631c
2 changed files with 3 additions and 4 deletions

View file

@ -14,7 +14,6 @@ cd ..
SUPPRESS=(
# To be resolved.
let_unit_value
option_map_unit_fn
question_mark
range_plus_one
redundant_closure

View file

@ -1308,9 +1308,9 @@ impl WlState {
// hangup events.
for &send_vfd_id in &send_vfd_ids[..vfd_count] {
if send_vfd_id.kind == VIRTIO_WL_CTRL_VFD_SEND_KIND_LOCAL {
self.vfds
.get_mut(&send_vfd_id.id.into())
.map(|vfd| vfd.close_remote());
if let Some(vfd) = self.vfds.get_mut(&send_vfd_id.id.into()) {
vfd.close_remote();
}
}
}
Ok(WlResp::Ok)