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

Method add_change

atomic-core/src/record/detect.rs:618–627  ·  view source on GitHub ↗

Add a detected change.

(&mut self, change: FileChange)

Source from the content-addressed store, hash-verified

616
617 /// Add a detected change.
618 pub fn add_change(&mut self, change: FileChange) {
619 match &change.kind {
620 FileChangeKind::Added { .. } => self.added_count += 1,
621 FileChangeKind::Modified { .. } => self.modified_count += 1,
622 FileChangeKind::Deleted => self.deleted_count += 1,
623 FileChangeKind::Moved { .. } => self.moved_count += 1,
624 FileChangeKind::MetadataOnly { .. } => self.metadata_only_count += 1,
625 }
626 self.changes.push(change);
627 }
628
629 /// Record that a file was checked.
630 pub fn record_checked(&mut self) {

Calls 1

pushMethod · 0.45

Tested by 8

test_result_iteratorsFunction · 0.36
test_result_mergeFunction · 0.36
test_result_cloneFunction · 0.36