MCPcopy Create free account
hub / github.com/Firstyear/opensuse-proxy-cache / bulkstrln_parser

Function bulkstrln_parser

redis-server/src/parser.rs:46–57  ·  view source on GitHub ↗
(input: &[u8])

Source from the content-addressed store, hash-verified

44}
45
46fn bulkstrln_parser(input: &[u8]) -> IResult<&[u8], (u32, usize)> {
47 let mut taken = 0;
48 let (rem, (ln, sz)) = line_parser(input)?;
49 taken += sz;
50
51 let (strln, _tag) = tag(b"$")(ln)?;
52
53 let a = unsafe { std::str::from_utf8_unchecked(&strln) };
54
55 let strln = u32::from_str_radix(a, 10).expect("Invalid str");
56 Ok((rem, (strln, taken)))
57}
58
59fn bulkstr_parser(input: &[u8]) -> IResult<&[u8], (IType<'_>, usize)> {
60 let mut taken = 0;

Callers 2

bulkstr_parserFunction · 0.85
array3_parserFunction · 0.85

Calls 1

line_parserFunction · 0.85

Tested by

no test coverage detected