File tree 5 files changed +19
-19
lines changed
5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ jobs:
27
27
strategy :
28
28
matrix :
29
29
features : [fancy, syntect-highlighter]
30
- rust : [1.56 .0, stable]
30
+ rust : [1.70 .0, stable]
31
31
os : [ubuntu-latest, macOS-latest, windows-latest]
32
32
exclude :
33
33
- features : syntect-highlighter
34
- rust : 1.56 .0
34
+ rust : 1.70 .0
35
35
36
36
steps :
37
37
- uses : actions/checkout@v4
@@ -41,15 +41,15 @@ jobs:
41
41
toolchain : ${{ matrix.rust }}
42
42
components : clippy
43
43
- name : Force older version of is-terminal for MSRV builds
44
- if : matrix.rust == '1.56 .0'
44
+ if : matrix.rust == '1.70 .0'
45
45
run : cargo update -p is-terminal --precise 0.4.7
46
46
- name : Clippy
47
47
run : cargo clippy --all -- -D warnings
48
48
- name : Run tests
49
49
if : matrix.rust == 'stable'
50
50
run : cargo test --all --verbose --features ${{matrix.features}}
51
51
- name : Run tests
52
- if : matrix.rust == '1.56 .0'
52
+ if : matrix.rust == '1.70 .0'
53
53
run : cargo test --all --verbose --features ${{matrix.features}} no-format-args-capture
54
54
55
55
miri :
Original file line number Diff line number Diff line change @@ -19,11 +19,10 @@ once_cell = "1.8.0"
19
19
unicode-width = " 0.1.9"
20
20
21
21
owo-colors = { version = " 3.4.0" , optional = true }
22
- is-terminal = { version = " 0.4.0" , optional = true }
23
22
textwrap = { version = " 0.15.0" , optional = true }
24
- supports-hyperlinks = { version = " 2 .0.0" , optional = true }
25
- supports-color = { version = " 2 .0.0" , optional = true }
26
- supports-unicode = { version = " 2 .0.0" , optional = true }
23
+ supports-hyperlinks = { version = " 3 .0.0" , optional = true }
24
+ supports-color = { version = " 3 .0.0" , optional = true }
25
+ supports-unicode = { version = " 3 .0.0" , optional = true }
27
26
backtrace = { version = " 0.3.61" , optional = true }
28
27
terminal_size = { version = " 0.3.0" , optional = true }
29
28
backtrace-ext = { version = " 0.2.1" , optional = true }
@@ -51,7 +50,6 @@ derive = ["miette-derive"]
51
50
no-format-args-capture = []
52
51
fancy-no-backtrace = [
53
52
" owo-colors" ,
54
- " is-terminal" ,
55
53
" textwrap" ,
56
54
" terminal_size" ,
57
55
" supports-hyperlinks" ,
Original file line number Diff line number Diff line change 1
- use is_terminal:: IsTerminal ;
1
+ use std:: io:: IsTerminal ;
2
+
2
3
use owo_colors:: Style ;
3
4
4
5
/**
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ impl LabeledSpan {
257
257
pub const fn new ( label : Option < String > , offset : ByteOffset , len : usize ) -> Self {
258
258
Self {
259
259
label,
260
- span : SourceSpan :: new ( SourceOffset ( offset) , SourceOffset ( len) ) ,
260
+ span : SourceSpan :: new ( SourceOffset ( offset) , len) ,
261
261
primary : false ,
262
262
}
263
263
}
Original file line number Diff line number Diff line change @@ -1842,11 +1842,11 @@ fn syntax_highlighter_on_real_file() {
1842
1842
let expected = format ! (
1843
1843
r#" × This is an error
1844
1844
╭─[{filename}:{l2}:{CO}]
1845
- {l1} │
1845
+ {l1} │
1846
1846
{l2} │ let (filename, line) = (file!(), line!() as usize);
1847
1847
· ─────────────┬─────────────
1848
1848
· ╰── this is a label
1849
- {l3} │
1849
+ {l3} │
1850
1850
╰────
1851
1851
"# ,
1852
1852
l1 = line - 1 ,
@@ -1855,6 +1855,7 @@ fn syntax_highlighter_on_real_file() {
1855
1855
) ;
1856
1856
assert ! ( out. contains( "\u{1b} [38;2;180;142;173m" ) ) ;
1857
1857
assert_eq ! ( expected, strip_ansi_escapes:: strip_str( out) ) ;
1858
+ }
1858
1859
1859
1860
#[ test]
1860
1861
fn triple_adjacent_highlight ( ) -> Result < ( ) , MietteError > {
@@ -1888,13 +1889,13 @@ fn triple_adjacent_highlight() -> Result<(), MietteError> {
1888
1889
1 │ source
1889
1890
· ───┬──
1890
1891
· ╰── this bit here
1891
- 2 │
1892
- 3 │
1892
+ 2 │
1893
+ 3 │
1893
1894
4 │ text
1894
1895
· ──┬─
1895
1896
· ╰── also this bit
1896
- 5 │
1897
- 6 │
1897
+ 5 │
1898
+ 6 │
1898
1899
7 │ here
1899
1900
· ──┬─
1900
1901
· ╰── finally we got
@@ -1934,10 +1935,10 @@ fn non_adjacent_highlight() -> Result<(), MietteError> {
1934
1935
1 │ source
1935
1936
· ───┬──
1936
1937
· ╰── this bit here
1937
- 2 │
1938
+ 2 │
1938
1939
╰────
1939
1940
╭─[bad_file.rs:5:3]
1940
- 4 │
1941
+ 4 │
1941
1942
5 │ text here
1942
1943
· ──┬─
1943
1944
· ╰── also this bit
You can’t perform that action at this time.
0 commit comments