mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: remove redundant SocketStream overrides
ReadVolatile already provides a default read_volatile_exact() implementation, and WriteVolatile a default write_volatile_exact() implementation. Overriding these functions adds no behavioral value, but duplicates logic and needs to be updated whenever SocketStream gains or changes a variant. On-behalf-of: SAP sebastian.eydam@sap.com Signed-off-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
d181d2c2ac
commit
6e501cc2dc
@@ -153,16 +153,6 @@ impl ReadVolatile for SocketStream {
|
||||
SocketStream::Tcp(s) => s.read_volatile(buf),
|
||||
}
|
||||
}
|
||||
|
||||
fn read_exact_volatile<B: BitmapSlice>(
|
||||
&mut self,
|
||||
buf: &mut VolatileSlice<B>,
|
||||
) -> Result<(), VolatileMemoryError> {
|
||||
match self {
|
||||
SocketStream::Unix(s) => s.read_exact_volatile(buf),
|
||||
SocketStream::Tcp(s) => s.read_exact_volatile(buf),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WriteVolatile for SocketStream {
|
||||
@@ -175,16 +165,6 @@ impl WriteVolatile for SocketStream {
|
||||
SocketStream::Tcp(s) => s.write_volatile(buf),
|
||||
}
|
||||
}
|
||||
|
||||
fn write_all_volatile<B: BitmapSlice>(
|
||||
&mut self,
|
||||
buf: &VolatileSlice<B>,
|
||||
) -> Result<(), VolatileMemoryError> {
|
||||
match self {
|
||||
SocketStream::Unix(s) => s.write_all_volatile(buf),
|
||||
SocketStream::Tcp(s) => s.write_all_volatile(buf),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for `fd` to become readable. In this case, we return true. In case
|
||||
|
||||
Reference in New Issue
Block a user