aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html_flow.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 10:49:28 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 10:49:28 +0200
commit246063fb7cd21a83beae5934f95b2795fb85df51 (patch)
tree5f82a11d17ea5468376693c7a0405ed71d7ae147 /tests/html_flow.rs
parent9cc1ad4a90616b7fb4ae7b425a5b9844887f4584 (diff)
downloadmarkdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.gz
markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.bz2
markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.zip
Refactor to use default trait in tests
Diffstat (limited to 'tests/html_flow.rs')
-rw-r--r--tests/html_flow.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/html_flow.rs b/tests/html_flow.rs
index 41f6565..d79f031 100644
--- a/tests/html_flow.rs
+++ b/tests/html_flow.rs
@@ -13,9 +13,9 @@ fn html_flow() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -37,11 +37,11 @@ fn html_flow() -> Result<(), String> {
parse: ParseOptions {
constructs: Constructs {
html_flow: false,
- ..Constructs::default()
+ ..Default::default()
},
- ..ParseOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
}
)?,
"<p>&lt;x&gt;</p>",
@@ -49,7 +49,7 @@ fn html_flow() -> Result<(), String> {
);
assert_eq!(
- to_mdast("<div>\nstuff\n</div>", &ParseOptions::default())?,
+ to_mdast("<div>\nstuff\n</div>", &Default::default())?,
Node::Root(Root {
children: vec![Node::Html(Html {
value: "<div>\nstuff\n</div>".into(),
@@ -69,9 +69,9 @@ fn html_flow_1_raw() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -241,9 +241,9 @@ fn html_flow_2_comment() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -350,9 +350,9 @@ fn html_flow_3_instruction() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -407,9 +407,9 @@ fn html_flow_4_declaration() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -472,9 +472,9 @@ fn html_flow_5_cdata() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -546,9 +546,9 @@ fn html_flow_6_basic() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(
@@ -833,9 +833,9 @@ fn html_flow_7_complete() -> Result<(), String> {
compile: CompileOptions {
allow_dangerous_html: true,
allow_dangerous_protocol: true,
- ..CompileOptions::default()
+ ..Default::default()
},
- ..Options::default()
+ ..Default::default()
};
assert_eq!(