mirror of
https://github.com/v0l/m3u8-rs.git
synced 2025-06-20 02:20:30 +00:00
Remove unwrap from version tag
This commit is contained in:
@ -384,7 +384,7 @@ named!(pub m3u_tag<String>,
|
|||||||
named!(pub version_tag<usize>,
|
named!(pub version_tag<usize>,
|
||||||
chain!(
|
chain!(
|
||||||
tag!("#EXT-X-VERSION:") ~ version: map_res!(digit, str::from_utf8),
|
tag!("#EXT-X-VERSION:") ~ version: map_res!(digit, str::from_utf8),
|
||||||
|| version.parse().unwrap() //TODO: or return a default value?
|
|| version.parse().unwrap_or_default()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user