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

Method parse_algorithm

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

Parse the algorithm string into an Algorithm enum.

(&self)

Source from the content-addressed store, hash-verified

236
237 /// Parse the algorithm string into an Algorithm enum.
238 pub(crate) fn parse_algorithm(&self) -> CliResult<Algorithm> {
239 self.algorithm
240 .parse()
241 .map_err(|_| CliError::InvalidArgument {
242 message: format!(
243 "unknown diff algorithm '{}'. Valid options: myers, patience",
244 self.algorithm
245 ),
246 })
247 }
248
249 /// Create a DiffOutputConfig from the command settings.
250 pub(crate) fn get_output_config(&self) -> DiffOutputConfig {

Callers 9

diffFunction · 0.45
diff_view_pairFunction · 0.45
diff_changeFunction · 0.45
run_git_diffMethod · 0.45
runMethod · 0.45

Calls 1

parseMethod · 0.45