1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// use similar::{Algorithm, capture_diff_slices};
// use super::Blob;
// fn diff_s() {
// let blob1 = Blob::new("/Users/noshishi/study/nss-workspace/nss_core/tests/test_repo/first.rs").unwrap();
// let blob2 = Blob::new("/Users/noshishi/study/nss-workspace/nss_core/tests/test_repo/first_diff.rs").unwrap();
// let ops = capture_diff_slices(Algorithm::Myers, &blob1.content, &blob2.content);
// let changes: Vec<_> = ops.iter().flat_map(|x| x.iter_slices(&blob1.content, &blob2.content)).collect();
// for c in changes{
// println!("{}", String::from_utf8(Vec::from(c.1)).unwrap());
// }
// }
// #[cfg(test)]
// mod tests {
// use super::*;
// #[test]
// fn test_index_empty() {
// diff_s()
// }
// }