aboutsummaryrefslogtreecommitdiffstats
path: root/tests/c
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-11 15:45:50 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-11 15:45:50 +0200
commit73d8609565b808ac73df5ac34e6d4f7f23c25ad6 (patch)
tree8b13c61bcd55380b36338473a74e172b63fb16d7 /tests/c
parent070b3efeeebf34fbc435ffc7fea2bad95689664a (diff)
downloadmarkdown-rs-73d8609565b808ac73df5ac34e6d4f7f23c25ad6.tar.gz
markdown-rs-73d8609565b808ac73df5ac34e6d4f7f23c25ad6.tar.bz2
markdown-rs-73d8609565b808ac73df5ac34e6d4f7f23c25ad6.zip
Refactor to use a bunch of `into`
Diffstat (limited to '')
-rw-r--r--tests/character_escape.rs2
-rw-r--r--tests/character_reference.rs2
-rw-r--r--tests/code_fenced.rs8
-rw-r--r--tests/code_indented.rs2
-rw-r--r--tests/code_text.rs6
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/character_escape.rs b/tests/character_escape.rs
index 54944aa..c5c9004 100644
--- a/tests/character_escape.rs
+++ b/tests/character_escape.rs
@@ -109,7 +109,7 @@ fn character_escape() -> Result<(), String> {
Node::Root(Root {
children: vec![Node::Paragraph(Paragraph {
children: vec![Node::Text(Text {
- value: "a * b".to_string(),
+ value: "a * b".into(),
position: Some(Position::new(1, 1, 0, 1, 7, 6))
}),],
position: Some(Position::new(1, 1, 0, 1, 7, 6))
diff --git a/tests/character_reference.rs b/tests/character_reference.rs
index 1cc732e..4e9a436 100644
--- a/tests/character_reference.rs
+++ b/tests/character_reference.rs
@@ -220,7 +220,7 @@ fn character_reference() -> Result<(), String> {
Node::Root(Root {
children: vec![Node::Paragraph(Paragraph {
children: vec![Node::Text(Text {
- value: "\u{a0} & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸".to_string(),
+ value: "\u{a0} & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸".into(),
position: Some(Position::new(1, 1, 0, 3, 33, 109))
}),],
position: Some(Position::new(1, 1, 0, 3, 33, 109))
diff --git a/tests/code_fenced.rs b/tests/code_fenced.rs
index 6da38a9..c41bd43 100644
--- a/tests/code_fenced.rs
+++ b/tests/code_fenced.rs
@@ -287,9 +287,9 @@ fn code_fenced() -> Result<(), String> {
)?,
Node::Root(Root {
children: vec![Node::Code(Code {
- lang: Some("js".to_string()),
- meta: Some("extra".to_string()),
- value: "console.log(1)\nconsole.log(2)".to_string(),
+ lang: Some("js".into()),
+ meta: Some("extra".into()),
+ value: "console.log(1)\nconsole.log(2)".into(),
position: Some(Position::new(1, 1, 0, 4, 4, 45))
})],
position: Some(Position::new(1, 1, 0, 4, 4, 45))
@@ -303,7 +303,7 @@ fn code_fenced() -> Result<(), String> {
children: vec![Node::Code(Code {
lang: None,
meta: None,
- value: "asd".to_string(),
+ value: "asd".into(),
position: Some(Position::new(1, 1, 0, 2, 4, 7))
})],
position: Some(Position::new(1, 1, 0, 2, 4, 7))
diff --git a/tests/code_indented.rs b/tests/code_indented.rs
index fd539d3..b02b092 100644
--- a/tests/code_indented.rs
+++ b/tests/code_indented.rs
@@ -212,7 +212,7 @@ fn code_indented() -> Result<(), String> {
children: vec![Node::Code(Code {
lang: None,
meta: None,
- value: "console.log(1)\nconsole.log(2)".to_string(),
+ value: "console.log(1)\nconsole.log(2)".into(),
position: Some(Position::new(1, 1, 0, 2, 19, 34))
})],
position: Some(Position::new(1, 1, 0, 3, 1, 35))
diff --git a/tests/code_text.rs b/tests/code_text.rs
index 25882c8..89fa63f 100644
--- a/tests/code_text.rs
+++ b/tests/code_text.rs
@@ -187,15 +187,15 @@ fn code_text() -> Result<(), String> {
children: vec![Node::Paragraph(Paragraph {
children: vec![
Node::Text(Text {
- value: "a ".to_string(),
+ value: "a ".into(),
position: Some(Position::new(1, 1, 0, 1, 3, 2))
}),
Node::InlineCode(InlineCode {
- value: "alpha".to_string(),
+ value: "alpha".into(),
position: Some(Position::new(1, 3, 2, 1, 10, 9))
}),
Node::Text(Text {
- value: " b.".to_string(),
+ value: " b.".into(),
position: Some(Position::new(1, 10, 9, 1, 13, 12))
})
],