1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-11-29 02:00:59 +00:00

Merge pull request #63 from sile/fix-build-error-on-rustc-1.45.2

Fix build errors on rustc-1.45.2
This commit is contained in:
Takeru Ohta 2020-08-15 20:22:04 +09:00 committed by GitHub
commit 23c799a88b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ impl InitializationVector {
/// assert_eq!(InitializationVector::Missing.to_u128(), None); /// assert_eq!(InitializationVector::Missing.to_u128(), None);
/// ``` /// ```
#[must_use] #[must_use]
pub const fn to_u128(&self) -> Option<u128> { pub fn to_u128(&self) -> Option<u128> {
match *self { match *self {
Self::Aes128(v) => Some(u128::from_be_bytes(v)), Self::Aes128(v) => Some(u128::from_be_bytes(v)),
Self::Number(n) => Some(n), Self::Number(n) => Some(n),
@ -93,7 +93,7 @@ impl InitializationVector {
/// ///
/// [`MediaSegment`]: crate::MediaSegment /// [`MediaSegment`]: crate::MediaSegment
#[must_use] #[must_use]
pub const fn to_slice(&self) -> Option<[u8; 0x10]> { pub fn to_slice(&self) -> Option<[u8; 0x10]> {
match &self { match &self {
Self::Aes128(v) => Some(*v), Self::Aes128(v) => Some(*v),
Self::Number(v) => Some(v.to_be_bytes()), Self::Number(v) => Some(v.to_be_bytes()),

View file

@ -144,7 +144,7 @@ impl KeyFormatVersions {
/// the future this number might increase. /// the future this number might increase.
#[inline] #[inline]
#[must_use] #[must_use]
pub const fn capacity(&self) -> usize { self.buffer.len() } pub fn capacity(&self) -> usize { self.buffer.len() }
/// Shortens the internal array to the provided length. /// Shortens the internal array to the provided length.
/// ///