aboutsummaryrefslogtreecommitdiffstats
path: root/src/to_html.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 13:37:22 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-14 13:37:22 +0200
commit88d1c902f7a1677516a2eabadf792e870e233bc2 (patch)
tree3eeff48bd006c6047d2524aa92190487a4b151fd /src/to_html.rs
parent7616c1d843d812b1a66757867f4ad561d349e2e3 (diff)
downloadmarkdown-rs-88d1c902f7a1677516a2eabadf792e870e233bc2.tar.gz
markdown-rs-88d1c902f7a1677516a2eabadf792e870e233bc2.tar.bz2
markdown-rs-88d1c902f7a1677516a2eabadf792e870e233bc2.zip
Remove `must_use` if tarpaulin doesn’t understand them
Also moves some code to separate files, in the hopes that tarpaulin understands them.
Diffstat (limited to 'src/to_html.rs')
-rw-r--r--src/to_html.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/to_html.rs b/src/to_html.rs
index 6811350..2685120 100644
--- a/src/to_html.rs
+++ b/src/to_html.rs
@@ -216,9 +216,8 @@ pub fn compile(events: &[Event], bytes: &[u8], options: &CompileOptions) -> Stri
if event.kind == Kind::Exit
&& (event.name == Name::BlankLineEnding || event.name == Name::LineEnding)
{
- line_ending_inferred = Some(LineEnding::from_str(
- Slice::from_position(bytes, &Position::from_exit_event(events, index)).as_str(),
- ));
+ let slice = Slice::from_position(bytes, &Position::from_exit_event(events, index));
+ line_ending_inferred = Some(slice.as_str().parse().unwrap());
break;
}