line_diff 0.13.2

A tool to compare single lines by tokenizing them into chunks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use line_diff::{compare_lines, Config};

use std::error;
use std::path::PathBuf;

type Result<T> = std::result::Result<T, Box<dyn error::Error>>;

fn main() -> Result<()> {
    println!("Example with using a single file containing two lines");
    let config = Config::from_file(
        false,
        false,
        vec![' '],
        PathBuf::from("examples/long-lines.txt"),
    );
    println!("{:?}", config);
    compare_lines(config)
}