File: 2002_diffy.patch

package info (click to toggle)
turtlefmt 0.1.2-5
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 288 kB
  • sloc: javascript: 68; makefile: 24; sh: 1
file content (36 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (2)
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
Description: avoid not-in-Debian crate diffy
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-09-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,6 @@
 [dependencies]
 anyhow = "1.0.86"
 clap = { version = "4.5.16", features = ["derive"] }
-diffy = "0.4.0"
 tree-sitter = "0.24.6"
 
 [dev-dependencies]
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,7 +16,6 @@
 
 use anyhow::{bail, Context, Result};
 use clap::Parser;
-use diffy::{create_patch, PatchFormatter};
 use std::ffi::OsStr;
 use std::fs;
 use std::path::{Path, PathBuf};
@@ -68,9 +67,7 @@
             continue;
         }
         if args.check {
-            let patch = create_patch(&original, &formatted);
             eprintln!("The format of {} is not correct", file.display());
-            println!("{}", PatchFormatter::new().with_color().fmt_patch(&patch));
             exit_code = ExitCode::from(65);
         } else {
             fs::write(&file, formatted)?;