chore: reorg
This commit is contained in:
48
__diff/diffy/Cargo.lock
generated
Normal file
48
__diff/diffy/Cargo.lock
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diffy"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"diffy 0.1.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diffy"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "925a541a0c52375c666c9b83f5f3ec226d54ae72daa136acbae7bb3289b54877"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
10
__diff/diffy/Cargo.toml
Normal file
10
__diff/diffy/Cargo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "diffy"
|
||||
version = "0.1.0"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
diffy = "0.1.1"
|
||||
16
__diff/diffy/src/main.rs
Normal file
16
__diff/diffy/src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use diffy::PatchFormatter;
|
||||
|
||||
const A: &str = r##"
|
||||
hello world
|
||||
hatter
|
||||
"##;
|
||||
const B: &str = r##"
|
||||
hello world
|
||||
hatterj
|
||||
"##;
|
||||
|
||||
fn main() {
|
||||
let patch = diffy::create_patch(A, B);
|
||||
let f = PatchFormatter::new().with_color();
|
||||
print!("{}", f.fmt_patch(&patch));
|
||||
}
|
||||
Reference in New Issue
Block a user