Read a text-encoded float (1-byte length + ASCII).
(rdr: &mut R)
| 1016 | |
| 1017 | /// Read a text-encoded float (1-byte length + ASCII). |
| 1018 | pub fn read_float_str<R: Read>(rdr: &mut R) -> Result<f64> { |
| 1019 | let n = rdr.read_u8()? as u32; |
| 1020 | let s = rdr.read_str(n)?; |
| 1021 | s.parse::<f64>().map_err(|_| MarshalError::InvalidBytecode) |
| 1022 | } |
| 1023 | |
| 1024 | /// Read a 4-byte-length-prefixed byte string. |
| 1025 | pub fn read_pstring<R: Read>(rdr: &mut R) -> Result<&[u8]> { |
no test coverage detected