diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 13:37:22 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 13:37:22 +0200 |
commit | 88d1c902f7a1677516a2eabadf792e870e233bc2 (patch) | |
tree | 3eeff48bd006c6047d2524aa92190487a4b151fd /src/to_html.rs | |
parent | 7616c1d843d812b1a66757867f4ad561d349e2e3 (diff) | |
download | markdown-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 '')
-rw-r--r-- | src/to_html.rs | 5 |
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; } |