(&self, change: Change)
| 104 | } |
| 105 | |
| 106 | pub(super) fn classify(&self, change: Change) -> Result<Change, RecordError> { |
| 107 | let (kind, supersedes) = match self { |
| 108 | Self::Durable | Self::Promotion { .. } => (ChangeKind::Durable, None), |
| 109 | Self::Snapshot { |
| 110 | working_copy, |
| 111 | supersedes, |
| 112 | .. |
| 113 | } => ( |
| 114 | ChangeKind::Snapshot { |
| 115 | working_copy: *working_copy, |
| 116 | }, |
| 117 | *supersedes, |
| 118 | ), |
| 119 | }; |
| 120 | change |
| 121 | .with_classification( |
| 122 | kind, |
| 123 | supersedes, |
| 124 | ChangeOrigin::Native, |
| 125 | CausalFrontier::empty(), |
| 126 | ) |
| 127 | .map_err(|error| RecordError::ChangeStore(error.to_string())) |
| 128 | } |
| 129 | |
| 130 | pub(super) fn verify_promotion_content( |
| 131 | &self, |
no test coverage detected