From 246063fb7cd21a83beae5934f95b2795fb85df51 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 14 Oct 2022 10:49:28 +0200 Subject: Refactor to use default trait in tests --- tests/html_flow.rs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tests/html_flow.rs') 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() } )?, "

<x>

", @@ -49,7 +49,7 @@ fn html_flow() -> Result<(), String> { ); assert_eq!( - to_mdast("
\nstuff\n
", &ParseOptions::default())?, + to_mdast("
\nstuff\n
", &Default::default())?, Node::Root(Root { children: vec![Node::Html(Html { value: "
\nstuff\n
".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!( -- cgit