mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-12-23 04:26:27 +00:00
fix some clippy lints
This commit is contained in:
parent
8eb45dceb7
commit
9a2cacf024
2 changed files with 2 additions and 1 deletions
|
@ -383,6 +383,7 @@ impl MediaPlaylist {
|
||||||
|
|
||||||
/// Computes the `Duration` of the [`MediaPlaylist`], by adding each segment
|
/// Computes the `Duration` of the [`MediaPlaylist`], by adding each segment
|
||||||
/// duration together.
|
/// duration together.
|
||||||
|
#[must_use]
|
||||||
pub fn duration(&self) -> Duration {
|
pub fn duration(&self) -> Duration {
|
||||||
self.segments.values().map(|s| s.duration.duration()).sum()
|
self.segments.values().map(|s| s.duration.duration()).sum()
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ impl KeyFormatVersions {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[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.
|
/// Removes the last element and returns it, or `None` if it is empty.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue