vmm_vhost: remove unused SystemListenerExt

This was only implemented for unix and is never called anywhere. The
listener code just calls SocketListener.accept() directly, and Windows
does not implement a Listener anyway, so this doesn't help abstract
anything.

Change-Id: I44503e37bccfd180101a91879abc592242187979
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5068395
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2023-11-28 13:32:29 -08:00 committed by crosvm LUCI
parent d63f9eea7c
commit 93bb2d9058

View file

@ -3,7 +3,6 @@
//! Unix specific code that keeps rest of the code in the crate platform independent.
use std::io::Result;
use std::os::unix::net::UnixListener;
use std::os::unix::net::UnixStream;
@ -14,15 +13,3 @@ pub type SystemListener = UnixListener;
pub type SystemStream = UnixStream;
pub(crate) use crate::connection::socket::SocketEndpoint as PlatformEndpoint;
/// Collection of platform-specific methods that SystemListener provides.
pub(crate) trait SystemListenerExt {
/// Accept a connection.
fn accept(&self) -> Result<SystemStream>;
}
impl SystemListenerExt for SystemListener {
fn accept(&self) -> Result<SystemStream> {
self.accept().map(|(socket, _address)| socket)
}
}