Debian Codegraph @

src/tests/ansi_test_utils.rs

raw symbols SCIP
1 #[cfg(test)]
2 #[allow(clippy::module_inception)]
3 pub mod ansi_test_utilsrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/ {
4 use ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/;
5
6 use craterust-analyzer cargo git-delta 0.19.2 crate/::ansirust-analyzer cargo git-delta 0.19.2 ansi/;
7 use craterust-analyzer cargo git-delta 0.19.2 crate/::configrust-analyzer cargo git-delta 0.19.2 config/::Configrust-analyzer cargo git-delta 0.19.2 config/Config#;
8 use craterust-analyzer cargo git-delta 0.19.2 crate/::deltarust-analyzer cargo git-delta 0.19.2 delta/::Staterust-analyzer cargo git-delta 0.19.2 delta/State#;
9 use craterust-analyzer cargo git-delta 0.19.2 crate/::paintrust-analyzer cargo git-delta 0.19.2 paint/;
10 use craterust-analyzer cargo git-delta 0.19.2 crate/::stylerust-analyzer cargo git-delta 0.19.2 style/::Stylerust-analyzer cargo git-delta 0.19.2 style/Style#;
11
12 // Check if `output[line_number]` start with `expected_prefix`
13 // Then check if the first style in the line is the `expected_style`
14 pub fn assert_line_has_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_has_style().(
15 output: &str,
16 line_number: usize,
17 expected_prefix: &str,
18 expected_style: &str,
19 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
20 ) {
21 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(_line_has_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_has_style().(
22 output,
23 line_number,
24 expected_prefix,
25 expected_style,
26 config,
27 false,
28 ));
29 }
30
31 // Check if `output[line_number]` start with `expected_prefix`
32 // Then check if it contains the `expected_substring` with the corresponding `expected_style`
33 // If the line contains multiples times the `expected_style`, will only compare with the first
34 // item found
35 pub fn assert_line_contain_substring_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_contain_substring_style().(
36 output: &str,
37 line_number: usize,
38 expected_prefix: &str,
39 expected_substring: &str,
40 expected_style: &str,
41 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
42 ) {
43 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
44 expected_substring,
45 _line_get_substring_matching_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_get_substring_matching_style().(
46 output,
47 line_number,
48 expected_prefix,
49 expected_style,
50 config,
51 )
52 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().()
53 );
54 }
55
56 // Check if `output[line_number]` start with `expected_prefix`
57 // Then check if the line does not contains the `expected_style`
58 pub fn assert_line_does_not_contain_substring_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_does_not_contain_substring_style().(
59 output: &str,
60 line_number: usize,
61 expected_prefix: &str,
62 expected_style: &str,
63 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
64 ) {
65 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(_line_get_substring_matching_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_get_substring_matching_style().(
66 output,
67 line_number,
68 expected_prefix,
69 expected_style,
70 config,
71 )
72 .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
73 }
74
75 pub fn assert_line_does_not_have_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_does_not_have_style().(
76 output: &str,
77 line_number: usize,
78 expected_prefix: &str,
79 expected_style: &str,
80 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
81 ) {
82 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not()._line_has_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_has_style().(
83 output,
84 line_number,
85 expected_prefix,
86 expected_style,
87 config,
88 false,
89 ));
90 }
91
92 pub fn assert_line_has_4_bit_color_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_has_4_bit_color_style().(
93 output: &str,
94 line_number: usize,
95 expected_prefix: &str,
96 expected_style: &str,
97 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
98 ) {
99 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(_line_has_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_has_style().(
100 output,
101 line_number,
102 expected_prefix,
103 expected_style,
104 config,
105 true,
106 ));
107 }
108
109 pub fn assert_line_has_no_colorrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_has_no_color().(output: &str, line_number: usize, expected_prefix: &str) {
110 let line = output.linesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]lines().().nthrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#nth().(line_number).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().();
111 let stripped_line = ansirust-analyzer cargo git-delta 0.19.2 ansi/::strip_ansi_codesrust-analyzer cargo git-delta 0.19.2 ansi/strip_ansi_codes().(line);
112 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(stripped_line.starts_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]starts_with().(expected_prefix));
113 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(line, stripped_line);
114 }
115
116 /// Assert that the specified line number of output (a) has, after stripping ANSI codes, a
117 /// substring starting at `substring_begin` equal to `expected_substring` and (b) in its raw
118 /// form contains a version of that substring syntax-highlighted according to
119 /// `language_extension`.
120 pub fn assert_line_has_syntax_highlighted_substringrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_line_has_syntax_highlighted_substring().(
121 output: &str,
122 line_number: usize,
123 substring_begin: usize,
124 expected_substring: &str,
125 filename_for_highlighting: &str,
126 state: Staterust-analyzer cargo git-delta 0.19.2 delta/State#,
127 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
128 ) {
129 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(
130 filename_for_highlighting.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().('.'),
131 "expecting filename, not just a file extension"
132 );
133 let line = output.linesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]lines().().nthrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#nth().(line_number).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().();
134 let substring_end = substring_begin rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().expected_substring.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().();
135 let substring = &ansirust-analyzer cargo git-delta 0.19.2 ansi/::strip_ansi_codesrust-analyzer cargo git-delta 0.19.2 ansi/strip_ansi_codes().(line)[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Index<I>`]index().substring_begin..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#substring_end]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Index<I>`]index().;
136 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(substring, expected_substring);
137 let painted_substring = paint_linerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/paint_line().(substring, filename_for_highlighting, state, config);
138 // remove trailing newline appended by paint::paint_lines.
139 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(line.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(painted_substring.trim_endrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]trim_end().()));
140 }
141
142 pub fn assert_has_color_other_than_plus_colorrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_has_color_other_than_plus_color().(string: &str, config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#) {
143 let (string_without_any_color, string_with_plus_color_only) =
144 get_color_variantsrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/get_color_variants().(string, config);
145 assert_nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_ne!!(string, string_without_any_color);
146 assert_nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_ne!!(string, string_with_plus_color_only);
147 }
148
149 pub fn assert_has_plus_color_onlyrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/assert_has_plus_color_only().(string: &str, config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#) {
150 let (string_without_any_color, string_with_plus_color_only) =
151 get_color_variantsrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/get_color_variants().(string, config);
152 assert_nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_ne!!(string, string_without_any_color);
153 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(string, string_with_plus_color_only);
154 }
155
156 pub fn get_color_variantsrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/get_color_variants().(string: &str, config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#) -> (Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) {
157 let string_without_any_color = ansirust-analyzer cargo git-delta 0.19.2 ansi/::strip_ansi_codesrust-analyzer cargo git-delta 0.19.2 ansi/strip_ansi_codes().(string);
158 let string_with_plus_color_only = config
159 .plus_stylerust-analyzer cargo git-delta 0.19.2 config/Config#plus_style.
160 .ansi_term_stylerust-analyzer cargo git-delta 0.19.2 style/Style#ansi_term_style.
161 .paintrust-analyzer cargo nu-ansi-term 0.50.3 display/impl#[Style]paint().(&string_without_any_color);
162 (
163 string_without_any_color.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
164 string_with_plus_color_only.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
165 )
166 }
167
168 pub fn paint_linerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/paint_line().(
169 line: &str,
170 filename_for_highlighting: &str,
171 state: Staterust-analyzer cargo git-delta 0.19.2 delta/State#,
172 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
173 ) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# {
174 let mut output_buffer = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]new().();
175 let mut unused_writer = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<u8>::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
176 let mut painter = paintrust-analyzer cargo git-delta 0.19.2 paint/::Painterrust-analyzer cargo git-delta 0.19.2 paint/Painter#::newrust-analyzer cargo git-delta 0.19.2 paint/impl#[`Painter<'p>`]new().(&mut unused_writer, config);
177 let syntax_highlighted_style = Stylerust-analyzer cargo git-delta 0.19.2 style/Style# {
178 is_syntax_highlightedrust-analyzer cargo git-delta 0.19.2 style/Style#is_syntax_highlighted.: true,
179 ..Stylerust-analyzer cargo git-delta 0.19.2 style/Style#::newrust-analyzer cargo git-delta 0.19.2 style/impl#[Style]new().()
180 };
181 painter.set_syntaxrust-analyzer cargo git-delta 0.19.2 paint/impl#[`Painter<'p>`]set_syntax().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(filename_for_highlighting));
182 painter.set_highlighterrust-analyzer cargo git-delta 0.19.2 paint/impl#[`Painter<'p>`]set_highlighter().();
183 let lines = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![(line.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), state)];
184 let syntax_style_sections = paintrust-analyzer cargo git-delta 0.19.2 paint/::get_syntax_style_sections_for_linesrust-analyzer cargo git-delta 0.19.2 paint/get_syntax_style_sections_for_lines().(
185 &lines,
186 painter.highlighterrust-analyzer cargo git-delta 0.19.2 paint/Painter#highlighter..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_mut().(),
187 config,
188 );
189 let diff_style_sections = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![(syntax_highlighted_style, lines[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..0.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().())]];
190 paintrust-analyzer cargo git-delta 0.19.2 paint/::Painterrust-analyzer cargo git-delta 0.19.2 paint/Painter#::paint_linesrust-analyzer cargo git-delta 0.19.2 paint/impl#[`Painter<'p>`]paint_lines().(
191 &lines,
192 &syntax_style_sections,
193 &diff_style_sections,
194 &[false],
195 &mut output_buffer,
196 config,
197 &mut Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
198 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
199 paintrust-analyzer cargo git-delta 0.19.2 paint/::BgShouldFillrust-analyzer cargo git-delta 0.19.2 paint/BgShouldFill#::defaultrust-analyzer cargo git-delta 0.19.2 paint/impl#[BgShouldFill][Default]default().(),
200 );
201 output_buffer
202 }
203
204 fn _line_extractrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_extract().<'a>(output: &'a str, line_number: usize, expected_prefix: &str) -> &'a str {
205 let line = output.linesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]lines().().nthrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#nth().(line_number).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().();
206 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(ansirust-analyzer cargo git-delta 0.19.2 ansi/::strip_ansi_codesrust-analyzer cargo git-delta 0.19.2 ansi/strip_ansi_codes().(line).starts_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]starts_with().(expected_prefix));
207 line
208 }
209
210 fn _line_get_substring_matching_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_get_substring_matching_style().<'a>(
211 output: &'a str,
212 line_number: usize,
213 expected_prefix: &str,
214 expected_style: &str,
215 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
216 ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str> {
217 let line = _line_extractrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_extract().(output, line_number, expected_prefix);
218 let style = Stylerust-analyzer cargo git-delta 0.19.2 style/Style#::from_strrust-analyzer cargo git-delta 0.19.2 parse_style/impl#[Style]from_str().(
219 expected_style,
220 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
221 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
222 config.true_colorrust-analyzer cargo git-delta 0.19.2 config/Config#true_color.,
223 config.git_configrust-analyzer cargo git-delta 0.19.2 config/Config#git_config..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(),
224 );
225 style.get_matching_substringrust-analyzer cargo git-delta 0.19.2 style/impl#[Style]get_matching_substring().(line)
226 }
227
228 fn _line_has_stylerust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_has_style().(
229 output: &str,
230 line_number: usize,
231 expected_prefix: &str,
232 expected_style: &str,
233 config: &Configrust-analyzer cargo git-delta 0.19.2 config/Config#,
234 _4_bit_color: bool,
235 ) -> bool {
236 let line = _line_extractrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/_line_extract().(output, line_number, expected_prefix);
237 let mut style = Stylerust-analyzer cargo git-delta 0.19.2 style/Style#::from_strrust-analyzer cargo git-delta 0.19.2 parse_style/impl#[Style]from_str().(
238 expected_style,
239 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
240 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
241 config.true_colorrust-analyzer cargo git-delta 0.19.2 config/Config#true_color.,
242 config.git_configrust-analyzer cargo git-delta 0.19.2 config/impl#[Config]git_config().(),
243 );
244 if _4_bit_color {
245 style.ansi_term_stylerust-analyzer cargo git-delta 0.19.2 style/Style#ansi_term_style..foregroundrust-analyzer cargo nu-ansi-term 0.50.3 style/Style#foreground. = style
246 .ansi_term_stylerust-analyzer cargo git-delta 0.19.2 style/Style#ansi_term_style.
247 .foregroundrust-analyzer cargo nu-ansi-term 0.50.3 style/Style#foreground.
248 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(ansi_term_fixed_foreground_to_4_bit_colorrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/ansi_term_fixed_foreground_to_4_bit_color().);
249 }
250 style.is_applied_torust-analyzer cargo git-delta 0.19.2 style/impl#[Style]is_applied_to().(line)
251 }
252
253 fn ansi_term_fixed_foreground_to_4_bit_colorrust-analyzer cargo git-delta 0.19.2 tests/ansi_test_utils/ansi_test_utils/ansi_term_fixed_foreground_to_4_bit_color().(color: ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#) -> ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color# {
254 match color {
255 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(30) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Blackrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Black#,
256 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(31) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Redrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Red#,
257 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(32) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Greenrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Green#,
258 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(33) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Yellowrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Yellow#,
259 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(34) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Bluerust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Blue#,
260 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(35) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Purplerust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Purple#,
261 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(36) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Cyanrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Cyan#,
262 ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Fixedrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#Fixed#(37) => ansi_termrust-analyzer cargo nu-ansi-term 0.50.3 crate/::Colorrust-analyzer cargo nu-ansi-term 0.50.3 style/Color#::Whiterust-analyzer cargo nu-ansi-term 0.50.3 style/Color#White#,
263 color => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!(
264 "Invalid 4-bit color: {:?}. \
265 (Add bright color entries to this map if needed for tests.",
266 color
267 ),
268 }
269 }
270 }