1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-05-24 03:08:23 +00:00

fix some clippy lints

This commit is contained in:
Luro02 2020-03-28 10:48:17 +01:00
parent 8eb45dceb7
commit 9a2cacf024
No known key found for this signature in database
GPG key ID: B66FD4F74501A9CF
2 changed files with 2 additions and 1 deletions

View file

@ -383,6 +383,7 @@ impl MediaPlaylist {
/// Computes the `Duration` of the [`MediaPlaylist`], by adding each segment
/// duration together.
#[must_use]
pub fn duration(&self) -> Duration {
self.segments.values().map(|s| s.duration.duration()).sum()
}

View file

@ -184,7 +184,7 @@ impl KeyFormatVersions {
/// ```
#[inline]
#[must_use]
pub fn is_empty(&self) -> bool { self.len() == 0 }
pub const fn is_empty(&self) -> bool { self.len() == 0 }
/// Removes the last element and returns it, or `None` if it is empty.
///