MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / extract_float_field

Function extract_float_field

nodedb-query/src/msgpack_scan/field.rs:107–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106 #[test]
107 fn extract_float_field() {
108 let buf = encode(&json!({"score": 99.5}));
109 let (start, _end) = extract_field(&buf, 0, "score").unwrap();
110 assert_eq!(read_f64(&buf, start), Some(99.5));
111 }
112
113 #[test]
114 fn extract_missing_field() {

Callers

nothing calls this directly

Calls 2

extract_fieldFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected