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

Enum Algorithm

atomic-core/src/diff/algorithm.rs:78–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76/// See the module documentation for detailed comparison.
77#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
78pub enum Algorithm {
79 /// Myers diff algorithm - finds the shortest edit script.
80 ///
81 /// This is the default algorithm, suitable for most use cases.
82 /// It guarantees finding the minimum number of changes but may
83 /// sometimes produce diffs that are harder to read when there
84 /// are many repeated lines.
85 Myers,
86
87 /// Patience diff algorithm - uses unique lines as anchors.
88 ///
89 /// This algorithm often produces more human-readable diffs,
90 /// especially for code with repeated patterns. It may not
91 /// find the absolute minimum edit distance but typically
92 /// produces more intuitive results.
93 Patience,
94}
95
96impl Default for Algorithm {
97 /// Returns the default algorithm (Myers).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected