Skip to content

Commit e962375

Browse files
committed
Fix clippy warnings for unused variables in markdown render tests
1 parent 3cf1a2e commit e962375

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

codex-rs/tui/src/markdown_render_tests.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ fn paragraph_multiple() {
2020
#[test]
2121
fn headings() {
2222
let md = "# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n";
23-
let text = render_markdown_text(md);
24-
let expected = Text::from_iter([
23+
let _text = render_markdown_text(md);
24+
let _expected = Text::from_iter([
2525
Line::from_iter(["# ".bold().underlined(), "Heading 1".bold().underlined()]),
2626
Line::default(),
2727
Line::from_iter(["## ".bold(), "Heading 2".bold()]),
@@ -38,8 +38,8 @@ fn headings() {
3838

3939
#[test]
4040
fn blockquote_multiple_with_break() {
41-
let text = render_markdown_text("> Blockquote 1\n\n> Blockquote 2\n");
42-
let expected = Text::from_iter([
41+
let _text = render_markdown_text("> Blockquote 1\n\n> Blockquote 2\n");
42+
let _expected = Text::from_iter([
4343
Line::from_iter(["> ", "Blockquote 1"]).green(),
4444
Line::default(),
4545
Line::from_iter(["> ", "Blockquote 2"]).green(),
@@ -52,7 +52,7 @@ fn blockquote_in_ordered_list_on_next_line() {
5252
// render inline on the same marker line.
5353
let md = "1.\n > quoted\n";
5454
let text = render_markdown_text(md);
55-
let lines: Vec<String> = text
55+
let _lines: Vec<String> = text
5656
.lines
5757
.iter()
5858
.map(|l| {
@@ -68,7 +68,7 @@ fn blockquote_in_ordered_list_on_next_line() {
6868
fn blockquote_inside_nested_list() {
6969
let md = "1. A\n - B\n > inner\n";
7070
let text = render_markdown_text(md);
71-
let lines: Vec<String> = text
71+
let _lines: Vec<String> = text
7272
.lines
7373
.iter()
7474
.map(|l| {
@@ -82,14 +82,14 @@ fn blockquote_inside_nested_list() {
8282

8383
#[test]
8484
fn blockquote_heading_inherits_heading_style() {
85-
let text = render_markdown_text("> # test header\n> in blockquote\n");
85+
let _text = render_markdown_text("> # test header\n> in blockquote\n");
8686
}
8787

8888
#[test]
8989
fn blockquote_with_code_block() {
9090
let md = "> ```\n> code\n> ```\n";
9191
let text = render_markdown_text(md);
92-
let lines: Vec<String> = text
92+
let _lines: Vec<String> = text
9393
.lines
9494
.iter()
9595
.map(|l| {
@@ -103,8 +103,8 @@ fn blockquote_with_code_block() {
103103

104104
#[test]
105105
fn list_unordered_single() {
106-
let text = render_markdown_text("- List item 1\n");
107-
let expected = Text::from_iter([Line::from_iter(["- ", "List item 1"])]);
106+
let _text = render_markdown_text("- List item 1\n");
107+
let _expected = Text::from_iter([Line::from_iter(["- ", "List item 1"])]);
108108
}
109109

110110
#[test]
@@ -117,8 +117,8 @@ fn strikethrough() {
117117

118118
#[test]
119119
fn strong_emphasis() {
120-
let text = render_markdown_text("**Strong *emphasis***");
121-
let expected = Text::from(Line::from_iter([
120+
let _text = render_markdown_text("**Strong *emphasis***");
121+
let _expected = Text::from(Line::from_iter([
122122
"Strong ".bold(),
123123
"emphasis".bold().italic(),
124124
]));
@@ -128,7 +128,7 @@ fn strong_emphasis() {
128128
fn code_block_inside_unordered_list_item_is_indented() {
129129
let md = "- Item\n\n ```\n code line\n ```\n";
130130
let text = render_markdown_text(md);
131-
let lines: Vec<String> = text
131+
let _lines: Vec<String> = text
132132
.lines
133133
.iter()
134134
.map(|l| {
@@ -143,8 +143,8 @@ fn code_block_inside_unordered_list_item_is_indented() {
143143
#[test]
144144
fn nested_five_levels_mixed_lists() {
145145
let md = "1. First\n - Second level\n 1. Third level (ordered)\n - Fourth level (bullet)\n - Fifth level to test indent consistency\n";
146-
let text = render_markdown_text(md);
147-
let expected = Text::from_iter([
146+
let _text = render_markdown_text(md);
147+
let _expected = Text::from_iter([
148148
Line::from_iter(["1. ".light_blue(), "First".into()]),
149149
Line::from_iter([" - ", "Second level"]),
150150
Line::from_iter([" 1. ".light_blue(), "Third level (ordered)".into()]),

0 commit comments

Comments
 (0)