Parse the algorithm string into an Algorithm enum.
(&self)
| 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 { |