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

Method from_diff

atomic-core/src/diff/display.rs:757–763  ·  view source on GitHub ↗

Create stats from a single diff.

(diff: &DiffResult)

Source from the content-addressed store, hash-verified

755impl DiffStats {
756 /// Create stats from a single diff.
757 pub fn from_diff(diff: &DiffResult) -> Self {
758 Self {
759 files_changed: 1,
760 lines_added: diff.insertions(),
761 lines_removed: diff.deletions(),
762 }
763 }
764
765 /// Merge another stats into this one.
766 pub fn merge(&mut self, other: &DiffStats) {

Callers

nothing calls this directly

Calls 2

insertionsMethod · 0.45
deletionsMethod · 0.45

Tested by

no test coverage detected