snippy 0.2.1

A command-line tool for that makes using LLMs for code generation a breeze
Documentation
1
2
3
4
5
6
7
use tracing::info;

pub fn print_diff(file: &str, old: &str, new: &str) {
    let patch = diffy::create_patch(old, new);
    let f = diffy::PatchFormatter::new().with_color();
    info!("Diff for file: {}\n{}", file, f.fmt_patch(&patch));
}