Create a new file change for a modified file. # Arguments `path` - Path to the file `inode` - File's inode `position` - Position in the graph `diff_ops` - Diff operations describing changes `old_encoding` - Encoding in pristine `new_encoding` - Encoding in working copy
(
path: impl Into<String>,
inode: Inode,
position: Position<NodeId>,
diff_ops: Vec<DiffOp>,
old_encoding: Encoding,
new_encoding: Encoding,
)
| 450 | /// * `old_encoding` - Encoding in pristine |
| 451 | /// * `new_encoding` - Encoding in working copy |
| 452 | pub fn modified( |
| 453 | path: impl Into<String>, |
| 454 | inode: Inode, |
| 455 | position: Position<NodeId>, |
| 456 | diff_ops: Vec<DiffOp>, |
| 457 | old_encoding: Encoding, |
| 458 | new_encoding: Encoding, |
| 459 | ) -> Self { |
| 460 | Self { |
| 461 | path: path.into(), |
| 462 | inode: Some(inode), |
| 463 | position: Some(position), |
| 464 | kind: FileChangeKind::Modified { |
| 465 | diff_ops, |
| 466 | old_encoding, |
| 467 | new_encoding, |
| 468 | }, |
| 469 | metadata: None, |
| 470 | size: None, |
| 471 | mtime: None, |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | /// Create a new file change for a deleted file. |
| 476 | /// |
nothing calls this directly
no test coverage detected