Skip to content

Commit

Permalink
Update codesnake to 0.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Jul 30, 2024
1 parent d5b6042 commit 426fdab
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 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 jaq-play/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jaq-interpret = { version = "1.2.0", path = "../jaq-interpret" }
jaq-core = { version = "1.2.0", path = "../jaq-core" }
jaq-std = { version = "1.2.0", path = "../jaq-std" }
aho-corasick = "1.1.2"
codesnake = { version = "0.1" }
codesnake = { version = "0.2" }
hifijson = "0.2"
log = "0.4.17"
unicode-width = "0.1.13"
Expand Down
4 changes: 3 additions & 1 deletion jaq-play/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ impl Report {
};
let labels = self.labels.into_iter().map(|(range, text, color)| {
let text = text.into_iter().map(color_maybe).collect::<Vec<_>>();
Label::new(range, text.join("")).with_style(move |s| color.apply(s).to_string())
Label::new(range)
.with_text(text.join(""))
.with_style(move |s| color.apply(s).to_string())
});
Block::new(idx, labels).unwrap().map_code(|c| {
let c = c.replace('\t', " ");
Expand Down
2 changes: 1 addition & 1 deletion jaq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jaq-interpret = { version = "1.2.0", path = "../jaq-interpret" }
jaq-core = { version = "1.2.0", path = "../jaq-core" }
jaq-std = { version = "1.5.0", path = "../jaq-std" }
atty = "0.2"
codesnake = { version = "0.1" }
codesnake = { version = "0.2" }
clap = { version = "4.0.0", features = ["derive"] }
env_logger = { version = "0.10.0", default-features = false }
hifijson = "0.2.0"
Expand Down
4 changes: 3 additions & 1 deletion jaq/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,9 @@ impl Report {
};
let labels = self.labels.into_iter().map(|(range, text, color)| {
let text = text.into_iter().map(color_maybe).collect::<Vec<_>>();
Label::new(range, text.join("")).with_style(move |s| color.apply(s).to_string())
Label::new(range)
.with_text(text.join(""))
.with_style(move |s| color.apply(s).to_string())
});
Block::new(idx, labels).unwrap().map_code(|c| {
let c = c.replace('\t', " ");
Expand Down

0 comments on commit 426fdab

Please sign in to comment.