aboutsummaryrefslogtreecommitdiffstats
path: root/tests/code_fenced.rs
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/code_fenced.rs
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 'tests/code_fenced.rs')
-rw-r--r--tests/code_fenced.rs8
1 files changed, 4 insertions, 4 deletions
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))