diff --git a/communication/src/allocator/zero_copy/mod.rs b/communication/src/allocator/zero_copy/mod.rs index 81b90c01f..7d0de7c01 100644 --- a/communication/src/allocator/zero_copy/mod.rs +++ b/communication/src/allocator/zero_copy/mod.rs @@ -1,8 +1,12 @@ //! Allocators based on serialized data which avoid copies. //! -//! These allocators are based on `Abomonation` serialization, and its ability to deserialized -//! typed Rust data in-place. They surface references to data, often ultimately referencing the +//! These allocators were based on `Abomonation` serialization, and its ability to deserialized +//! typed Rust data in-place. They surfaced references to data, often ultimately referencing the //! raw binary data they initial received. +//! +//! For the moment, they no longer use Abomonation due to its unsafety, and instead rely on the +//! use of `Message::from_bytes` which .. could .. use Abomonation or something safer, but uses +//! `bincode` at of this writing. pub mod bytes_slab; pub mod bytes_exchange; diff --git a/communication/src/allocator/zero_copy/push_pull.rs b/communication/src/allocator/zero_copy/push_pull.rs index 8ce465b8c..c57f60a4b 100644 --- a/communication/src/allocator/zero_copy/push_pull.rs +++ b/communication/src/allocator/zero_copy/push_pull.rs @@ -90,7 +90,7 @@ impl Pull> for Puller { self.receiver .borrow_mut() .pop_front() - .map(|bytes| Message::from_bytes(bytes)); + .map(Message::from_bytes); &mut self.current } @@ -134,7 +134,7 @@ impl Pull> for PullerInner { self.receiver .borrow_mut() .pop_front() - .map(|bytes| Message::from_bytes(bytes)); + .map(Message::from_bytes); &mut self.current }