mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +00:00
shut up clippy
This commit is contained in:
parent
722a6c8bb8
commit
12a557eb02
8 changed files with 10 additions and 10 deletions
|
|
@ -73,6 +73,6 @@ fn test_regex() {
|
|||
.captures_iter(r"Some **bold 1** and **bold 2** with ")
|
||||
.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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ")
|
||||
.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!(&first["data"], "code line 1\ncode line 2");
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ fn test_regex_title() {
|
|||
.captures_iter(r"## Header ")
|
||||
.collect();
|
||||
|
||||
let first = cap.get(0).unwrap();
|
||||
let first = cap.first().unwrap();
|
||||
assert_eq!(&first[0], "## Header ");
|
||||
assert_eq!(&first["level"], "##");
|
||||
assert_eq!(&first["title"], "Header ");
|
||||
|
|
|
|||
|
|
@ -88,6 +88,6 @@ fn test_regex() {
|
|||
.captures_iter(r"Some `pre 1` and `pre 2` with ")
|
||||
.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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ fn test_regex() {
|
|||
.captures_iter(r"> Some quote with ")
|
||||
.collect();
|
||||
|
||||
let first = cap.get(0).unwrap();
|
||||
let first = cap.first().unwrap();
|
||||
assert_eq!(&first[0], "> Some quote with ");
|
||||
assert_eq!(&first["text"], "Some quote with ");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ fn test_regex_link() {
|
|||
.captures_iter(r"[link1](https://link1.com) [link2](https://link2.com)")
|
||||
.collect();
|
||||
|
||||
let first = cap.get(0).unwrap();
|
||||
let first = cap.first().unwrap();
|
||||
assert_eq!(&first[0], "[link1](https://link1.com)");
|
||||
assert_eq!(&first["text"], "link1");
|
||||
assert_eq!(&first["url"], "https://link1.com");
|
||||
|
|
@ -270,7 +270,7 @@ fn test_regex_image_link() {
|
|||
r"[](https://image2.com) [](https://image4.com)"
|
||||
).collect();
|
||||
|
||||
let first = cap.get(0).unwrap();
|
||||
let first = cap.first().unwrap();
|
||||
assert_eq!(
|
||||
&first[0],
|
||||
"[](https://image2.com)"
|
||||
|
|
@ -296,7 +296,7 @@ fn test_regex_image() {
|
|||
.captures_iter(r" ")
|
||||
.collect();
|
||||
|
||||
let first = cap.get(0).unwrap();
|
||||
let first = cap.first().unwrap();
|
||||
assert_eq!(&first[0], "");
|
||||
assert_eq!(&first["alt"], "image1");
|
||||
assert_eq!(&first["url"], "https://image1.com");
|
||||
|
|
|
|||
|
|
@ -78,6 +78,6 @@ fn test_regex() {
|
|||
.captures_iter(r"Some ~~strike 1~~ and ~~strike 2~~ with ")
|
||||
.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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,6 @@ fn test_regex() {
|
|||
.captures_iter(r"Some _underline 1_ and _underline 2_ with ")
|
||||
.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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue