Skip to content

Commit

Permalink
Merge branch 'main' into 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk authored Sep 25, 2023
2 parents 28013af + f816657 commit 7c387a0
Show file tree
Hide file tree
Showing 581 changed files with 9,468 additions and 3,763 deletions.
24 changes: 19 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/cargo-rst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }

console = "0.15.7"
similar = { workspace = true, features = ["inline"] }
similar = { workspace = true, features = ["inline", "text", "bytes"] }
1 change: 1 addition & 0 deletions crates/cargo-rst/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub mod rst;
mod terminal_inline;
mod update;
pub use rst::test;
pub use terminal_inline::*;
pub use update::update;

// #[derive(FromArgs)]
Expand Down
5 changes: 5 additions & 0 deletions crates/cargo-rst/src/terminal_inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ pub fn diff_and_print(expected: &str, actual: &str) -> String {
let diff = TextDiff::from_lines(expected, actual);
pretty_diff_printer(&diff)
}

pub fn git_diff(expected: &str, actual: &str) -> String {
let diff = TextDiff::from_lines(expected, actual);
diff.unified_diff().header("expected", "actual").to_string()
}
Loading

0 comments on commit 7c387a0

Please sign in to comment.