shut up clippy

This commit is contained in:
yggverse 2026-03-09 22:19:30 +02:00
parent 722a6c8bb8
commit 12a557eb02
8 changed files with 10 additions and 10 deletions

View file

@ -73,6 +73,6 @@ fn test_regex() {
.captures_iter(r"Some **bold 1** and **bold 2** with ![img](https://link.com)") .captures_iter(r"Some **bold 1** and **bold 2** with ![img](https://link.com)")
.collect(); .collect();
assert_eq!(&cap.get(0).unwrap()["text"], "bold 1"); assert_eq!(&cap.first().unwrap()["text"], "bold 1");
assert_eq!(&cap.get(1).unwrap()["text"], "bold 2"); assert_eq!(&cap.get(1).unwrap()["text"], "bold 2");
} }

View file

@ -118,7 +118,7 @@ fn test_regex() {
.captures_iter("Some ``` alt text\ncode line 1\ncode line 2``` and ```\ncode line 3\ncode line 4``` with ![img](https://link.com)") .captures_iter("Some ``` alt text\ncode line 1\ncode line 2``` and ```\ncode line 3\ncode line 4``` with ![img](https://link.com)")
.collect(); .collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!(alt(first.name("alt").map(|m| m.as_str())), Some("alt text")); assert_eq!(alt(first.name("alt").map(|m| m.as_str())), Some("alt text"));
assert_eq!(&first["data"], "code line 1\ncode line 2"); assert_eq!(&first["data"], "code line 1\ncode line 2");

View file

@ -122,7 +122,7 @@ fn test_regex_title() {
.captures_iter(r"## Header ![alt](https://link.com)") .captures_iter(r"## Header ![alt](https://link.com)")
.collect(); .collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!(&first[0], "## Header ![alt](https://link.com)"); assert_eq!(&first[0], "## Header ![alt](https://link.com)");
assert_eq!(&first["level"], "##"); assert_eq!(&first["level"], "##");
assert_eq!(&first["title"], "Header ![alt](https://link.com)"); assert_eq!(&first["title"], "Header ![alt](https://link.com)");

View file

@ -88,6 +88,6 @@ fn test_regex() {
.captures_iter(r"Some `pre 1` and `pre 2` with ![img](https://link.com)") .captures_iter(r"Some `pre 1` and `pre 2` with ![img](https://link.com)")
.collect(); .collect();
assert_eq!(&cap.get(0).unwrap()["text"], "pre 1"); assert_eq!(&cap.first().unwrap()["text"], "pre 1");
assert_eq!(&cap.get(1).unwrap()["text"], "pre 2"); assert_eq!(&cap.get(1).unwrap()["text"], "pre 2");
} }

View file

@ -55,7 +55,7 @@ fn test_regex() {
.captures_iter(r"> Some quote with ![img](https://link.com)") .captures_iter(r"> Some quote with ![img](https://link.com)")
.collect(); .collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!(&first[0], "> Some quote with ![img](https://link.com)"); assert_eq!(&first[0], "> Some quote with ![img](https://link.com)");
assert_eq!(&first["text"], "Some quote with ![img](https://link.com)"); assert_eq!(&first["text"], "Some quote with ![img](https://link.com)");
} }

View file

@ -250,7 +250,7 @@ fn test_regex_link() {
.captures_iter(r"[link1](https://link1.com) [link2](https://link2.com)") .captures_iter(r"[link1](https://link1.com) [link2](https://link2.com)")
.collect(); .collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!(&first[0], "[link1](https://link1.com)"); assert_eq!(&first[0], "[link1](https://link1.com)");
assert_eq!(&first["text"], "link1"); assert_eq!(&first["text"], "link1");
assert_eq!(&first["url"], "https://link1.com"); assert_eq!(&first["url"], "https://link1.com");
@ -270,7 +270,7 @@ fn test_regex_image_link() {
r"[![image1](https://image1.com)](https://image2.com) [![image3](https://image3.com)](https://image4.com)" r"[![image1](https://image1.com)](https://image2.com) [![image3](https://image3.com)](https://image4.com)"
).collect(); ).collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!( assert_eq!(
&first[0], &first[0],
"[![image1](https://image1.com)](https://image2.com)" "[![image1](https://image1.com)](https://image2.com)"
@ -296,7 +296,7 @@ fn test_regex_image() {
.captures_iter(r"![image1](https://image1.com) ![image2](https://image2.com)") .captures_iter(r"![image1](https://image1.com) ![image2](https://image2.com)")
.collect(); .collect();
let first = cap.get(0).unwrap(); let first = cap.first().unwrap();
assert_eq!(&first[0], "![image1](https://image1.com)"); assert_eq!(&first[0], "![image1](https://image1.com)");
assert_eq!(&first["alt"], "image1"); assert_eq!(&first["alt"], "image1");
assert_eq!(&first["url"], "https://image1.com"); assert_eq!(&first["url"], "https://image1.com");

View file

@ -78,6 +78,6 @@ fn test_regex() {
.captures_iter(r"Some ~~strike 1~~ and ~~strike 2~~ with ![img](https://link.com)") .captures_iter(r"Some ~~strike 1~~ and ~~strike 2~~ with ![img](https://link.com)")
.collect(); .collect();
assert_eq!(&cap.get(0).unwrap()["text"], "strike 1"); assert_eq!(&cap.first().unwrap()["text"], "strike 1");
assert_eq!(&cap.get(1).unwrap()["text"], "strike 2"); assert_eq!(&cap.get(1).unwrap()["text"], "strike 2");
} }

View file

@ -74,6 +74,6 @@ fn test_regex() {
.captures_iter(r"Some _underline 1_ and _underline 2_ with ![img](https://link.com)") .captures_iter(r"Some _underline 1_ and _underline 2_ with ![img](https://link.com)")
.collect(); .collect();
assert_eq!(&cap.get(0).unwrap()["text"], "underline 1"); assert_eq!(&cap.first().unwrap()["text"], "underline 1");
assert_eq!(&cap.get(1).unwrap()["text"], "underline 2"); assert_eq!(&cap.get(1).unwrap()["text"], "underline 2");
} }