Skip to content

Commit 582259a

Browse files
committed
Refactor into separate bin and lib folders
1 parent da05a52 commit 582259a

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,18 @@ members = [
55
"lib/normal-diff",
66
"bin/diff",
77
]
8+
9+
[package]
10+
name = "diffutils"
11+
version = "0.3.0"
12+
authors = ["Michael Howell <[email protected]>"]
13+
edition = "2018"
14+
15+
[dependencies]
16+
context-diff = { path = "lib/context-diff", version = "0.3.0" }
17+
normal-diff = { path = "lib/normal-diff", version = "0.3.0" }
18+
unified-diff = { path = "lib/unified-diff", version = "0.3.0" }
19+
20+
[[bin]]
21+
name = "diffutils"
22+
path = "bin/main.rs"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A package (currently just `diff`, but eventually more) of programs related to fi
33
Based on the incomplete diff generator in https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs, and made to be compatible with GNU's diff and patch tools.
44

55
```
6-
~/diffutils$ cargo run -- -u3 Cargo.lock Cargo.toml
6+
~/diffutils$ cargo run -- diff -u3 Cargo.lock Cargo.toml
77
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
88
Running `target/debug/diff -u3 Cargo.lock Cargo.toml`
99
--- Cargo.lock

bin/diff/Cargo.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.

lib/context-diff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "context-diff"
3-
version = "0.1.0"
3+
version = "0.3.0"
44
authors = [
55
"Michael Howell <[email protected]>",
66
"The Rust Project Developers"

lib/normal-diff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "normal-diff"
3-
version = "0.1.0"
3+
version = "0.3.0"
44
authors = [
55
"Michael Howell <[email protected]>",
66
"The Rust Project Developers"

0 commit comments

Comments
 (0)