Fix some minor clippy warnings

This commit is contained in:
Sebastian Dröge 2022-12-02 10:21:08 +02:00 committed by Sebastian Dröge
parent b0a9fe2625
commit 015b05f26c
2 changed files with 4 additions and 5 deletions

View file

@ -989,9 +989,8 @@ mod tests {
#[test]
fn incomplete_manifest() {
assert_eq!(
is_master_playlist("#EXTM3U\n#EXT-X-VERSION:5\n#EXT-X-TARGETDU".as_bytes()),
false
);
assert!(!is_master_playlist(
"#EXTM3U\n#EXT-X-VERSION:5\n#EXT-X-TARGETDU".as_bytes()
));
}
}

View file

@ -412,7 +412,7 @@ impl TryFrom<QuotedOrUnquoted> for ClosedCaptionGroupId {
fn try_from(s: QuotedOrUnquoted) -> Result<ClosedCaptionGroupId, String> {
match s {
QuotedOrUnquoted::Unquoted(s) if s == "NONE" => Ok(ClosedCaptionGroupId::None),
QuotedOrUnquoted::Unquoted(s) => Ok(ClosedCaptionGroupId::Other(String::from(s))),
QuotedOrUnquoted::Unquoted(s) => Ok(ClosedCaptionGroupId::Other(s)),
QuotedOrUnquoted::Quoted(s) => Ok(ClosedCaptionGroupId::GroupId(s)),
}
}