Refactor Readable trait (#3309)
Currently Writable accepts trait Write as a type parameter but Readable takes Read as a trait object, which is not symmetrical and also less performant. This PR changes Readable trait and all places where it's used
This commit is contained in:
@@ -155,7 +155,7 @@ impl Writeable for TestElem {
|
||||
}
|
||||
|
||||
impl Readable for TestElem {
|
||||
fn read(reader: &mut dyn Reader) -> Result<TestElem, ser::Error> {
|
||||
fn read<R: Reader>(reader: &mut R) -> Result<TestElem, ser::Error> {
|
||||
Ok(TestElem([
|
||||
reader.read_u32()?,
|
||||
reader.read_u32()?,
|
||||
|
||||
Reference in New Issue
Block a user