MCPcopy Create free account
hub / github.com/archlinux/alpm / size

Function size

alpm-mtree/src/parser.rs:232–239  ·  view source on GitHub ↗

Get a string representing a size by consuming all integers.

(input: &mut &str)

Source from the content-addressed store, hash-verified

230
231/// Get a string representing a size by consuming all integers.
232fn size(input: &mut &str) -> ModalResult<u64> {
233 cut_err(take_while(0.., |c| c != ' ' && c != '\n').parse_to())
234 .context(StrContext::Label("file size"))
235 .context(StrContext::Expected(StrContextValue::Description(
236 "a positive integer representing the file's size.",
237 )))
238 .parse_next(input)
239}
240
241/// Parse a single property.
242fn property<'s>(input: &mut &'s str) -> ModalResult<PathProperty<'s>> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected