MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / parse_algorithm

Method parse_algorithm

atomic-cli/src/commands/diff/command.rs:180–189  ·  view source on GitHub ↗

Parse the algorithm string into an Algorithm enum.

(&self)

Source from the content-addressed store, hash-verified

178
179 /// Parse the algorithm string into an Algorithm enum.
180 pub(crate) fn parse_algorithm(&self) -> CliResult<Algorithm> {
181 self.algorithm
182 .parse()
183 .map_err(|_| CliError::InvalidArgument {
184 message: format!(
185 "unknown diff algorithm '{}'. Valid options: myers, patience",
186 self.algorithm
187 ),
188 })
189 }
190
191 /// Create a DiffOutputConfig from the command settings.
192 pub(crate) fn get_output_config(&self) -> DiffOutputConfig {

Callers 5

runMethod · 0.45

Calls 1

parseMethod · 0.45