Skip to content

Commit

Permalink
bump annotate-snippets to 0.10
Browse files Browse the repository at this point in the history
FIXME colors didn't checked, as currently used renderer::plain instead of color choose, and no fail
  • Loading branch information
klensy committed Jan 11, 2024
1 parent 17a74d3 commit 9d64f14
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 81 deletions.
25 changes: 11 additions & 14 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ comma = "1.0.0"
anyhow = "1.0.6"
indicatif = "0.17.6"
prettydiff = { version = "0.6.4", default_features = false }
annotate-snippets = { version = "0.9.1", features = ["color"] }
annotate-snippets = { version = "0.10.0" }
levenshtein = "1.0.5"
spanned = "0.1.3"

Expand Down
13 changes: 3 additions & 10 deletions src/status_emitter.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! Variaous schemes for reporting messages during testing or after testing is done.
use annotate_snippets::{
display_list::{DisplayList, FormatOptions},
snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation},
};
use annotate_snippets::{Annotation, AnnotationType, Renderer, Slice, Snippet, SourceAnnotation};
use bstr::ByteSlice;
use colored::Colorize;
use crossbeam_channel::{Sender, TryRecvError};
Expand Down Expand Up @@ -642,13 +639,9 @@ fn create_error(
})
.collect(),
footer: vec![],
opt: FormatOptions {
color: colored::control::SHOULD_COLORIZE.should_colorize(),
anonymized_line_numbers: false,
margin: None,
},
};
println!("{}", DisplayList::from(msg));
let renderer = Renderer::plain();
println!("{}", renderer.render(msg));
}

fn gha_error(error: &Error, test_path: &str, revision: &str) {
Expand Down
25 changes: 11 additions & 14 deletions tests/integrations/basic-fail-mode/Cargo.lock

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

25 changes: 11 additions & 14 deletions tests/integrations/basic-fail/Cargo.lock

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

25 changes: 11 additions & 14 deletions tests/integrations/basic/Cargo.lock

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

25 changes: 11 additions & 14 deletions tests/integrations/cargo-run/Cargo.lock

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

0 comments on commit 9d64f14

Please sign in to comment.