From 798978c99c91c3c768e7c2ac0f5a190c2a1a9ed4 Mon Sep 17 00:00:00 2001 From: mochi-neko Date: Sat, 17 Feb 2024 16:05:32 +0900 Subject: [PATCH] Fix doc-tests --- src/srt.rs | 4 ++-- src/vtt.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srt.rs b/src/srt.rs index 09a7545..227f929 100644 --- a/src/srt.rs +++ b/src/srt.rs @@ -16,7 +16,7 @@ //! Thank you for your reading. //! "#; //! -//! let srt = SubRip::parse(text)?; +//! let srt = SubRip::parse(text).unwrap(); //! assert_eq!(srt, SubRip { //! subtitles: vec![ //! SrtSubtitle { @@ -128,7 +128,7 @@ impl SubRip { /// Thank you for your reading. /// "#; /// - /// let srt = SubRip::parse(text)?; + /// let srt = SubRip::parse(text).unwrap(); /// ``` pub fn parse(text: &str) -> ParseResult { str_parser::srt(text).map_err(|err| err.into()) diff --git a/src/vtt.rs b/src/vtt.rs index 8c6ea91..236d0c8 100644 --- a/src/vtt.rs +++ b/src/vtt.rs @@ -17,7 +17,7 @@ //! - You could die. //! "#; //! -//! let vtt = WebVtt::parse(text)?; +//! let vtt = WebVtt::parse(text).unwrap(); //! //! assert_eq!( //! vtt, @@ -160,7 +160,7 @@ impl WebVtt { /// - You could die. /// "#; /// - /// let vtt = WebVtt::parse(text)?; + /// let vtt = WebVtt::parse(text).unwrap(); /// ``` pub fn parse(input: &str) -> Result { crate::vtt_parser::vtt(input).map_err(Into::into)