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

Function validate

alpm-srcinfo/src/commands.rs:75–79  ·  view source on GitHub ↗

Validates a SRCINFO file from a path or stdin. Wraps the [`parse`] function and allows to ensure that no errors occurred during parsing.

(file: Option<&PathBuf>, schema: Option<SourceInfoSchema>)

Source from the content-addressed store, hash-verified

73///
74/// Wraps the [`parse`] function and allows to ensure that no errors occurred during parsing.
75pub fn validate(file: Option<&PathBuf>, schema: Option<SourceInfoSchema>) -> Result<(), Error> {
76 let _result = parse(file, schema)?;
77
78 Ok(())
79}
80
81/// Parses a SRCINFO file from a path or stdin and outputs it in the specified format on stdout.
82///

Callers 1

mainFunction · 0.70

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected