We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 659d359 commit c875dddCopy full SHA for c875ddd
components/micromarshal/src/marshal.rs
@@ -104,14 +104,6 @@ impl Marshal for OrderedFloat<f64> {
104
}
105
106
107
-impl Marshal for f64 {
108
- fn marshal(&self, scratch: &mut [u8]) {
109
- let bits = self.to_bits();
110
- let bytes = bits.to_le_bytes();
111
- scratch.copy_from_slice(&bytes);
112
- }
113
-}
114
-
115
impl Marshal for bool {
116
fn marshal(&self, scratch: &mut [u8]) {
117
scratch[0] = *self as u8;
components/micromarshal/src/unmarshal.rs
@@ -17,6 +17,8 @@ use std::io;
17
use std::io::Error;
18
use std::io::Result;
19
20
+use ordered_float::OrderedFloat;
21
+
22
pub trait Unmarshal<T> {
23
fn unmarshal(scratch: &[u8]) -> T;
24
fn try_unmarshal(scratch: &[u8]) -> Result<T> {
0 commit comments