MCPcopy Index your code
hub / github.com/RustPython/RustPython / read_float_str

Function read_float_str

crates/compiler-core/src/marshal.rs:1018–1022  ·  view source on GitHub ↗

Read a text-encoded float (1-byte length + ASCII).

(rdr: &mut R)

Source from the content-addressed store, hash-verified

1016
1017/// Read a text-encoded float (1-byte length + ASCII).
1018pub 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.
1025pub fn read_pstring<R: Read>(rdr: &mut R) -> Result<&[u8]> {

Callers 1

deserialize_value_typedFunction · 0.85

Calls 2

read_u8Method · 0.80
read_strMethod · 0.80

Tested by

no test coverage detected