mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
virtio-devices: vsock: Fix clippy error
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
1a01f2d82a
commit
6b40f2dbc5
@ -420,7 +420,7 @@ impl VsockMuxer {
|
||||
Some(EpollListener::LocalStream(_)) => {
|
||||
if let Some(EpollListener::LocalStream(mut stream)) = self.remove_listener(fd) {
|
||||
Self::read_local_stream_port(&mut stream)
|
||||
.and_then(|peer_port| Ok((self.allocate_local_port(), peer_port)))
|
||||
.map(|peer_port| (self.allocate_local_port(), peer_port))
|
||||
.and_then(|(local_port, peer_port)| {
|
||||
self.add_connection(
|
||||
ConnMapKey {
|
||||
@ -517,7 +517,7 @@ impl VsockMuxer {
|
||||
evset: conn.get_polled_evset(),
|
||||
},
|
||||
)
|
||||
.and_then(|_| {
|
||||
.map(|_| {
|
||||
if conn.has_pending_rx() {
|
||||
// We can safely ignore any error in adding a connection RX indication. Worst
|
||||
// case scenario, the RX queue will get desynchronized, but we'll handle that
|
||||
@ -525,7 +525,6 @@ impl VsockMuxer {
|
||||
self.rxq.push(MuxerRx::ConnRx(key));
|
||||
}
|
||||
self.conn_map.insert(key, conn);
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
@ -573,9 +572,8 @@ impl VsockMuxer {
|
||||
fd,
|
||||
epoll::Event::new(evset, fd as u64),
|
||||
)
|
||||
.and_then(|_| {
|
||||
.map(|_| {
|
||||
self.listener_map.insert(fd, listener);
|
||||
Ok(())
|
||||
})
|
||||
.map_err(Error::EpollAdd)?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user