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

Method parse_algorithm

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

Parse the algorithm string into an Algorithm enum.

(&self)

Source from the content-addressed store, hash-verified

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

Callers 5

runMethod · 0.45

Calls 1

parseMethod · 0.45