Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Deserializer::{from_slice, with_reader} types (#332)
Having these in the impl block with a generic R paramter would make them unusable, at least without type annotations: error[E0282]: type annotations needed --> msg_socket2/src/socket.rs:45:32 | 45 | let mut deserializer = Deserializer::with_reader(bytes.as_slice(), DefaultOptions::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `R` error: aborting due to previous error For more information about this error, try `rustc --explain E0282`. Moving these into separate impl blocks, which set the type of the Deserializer to the return type of the functions, fixes this error.
- Loading branch information