mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-25 08:31:00 +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:
commit
23c799a88b
2 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ impl InitializationVector {
|
|||
/// assert_eq!(InitializationVector::Missing.to_u128(), None);
|
||||
/// ```
|
||||
#[must_use]
|
||||
pub const fn to_u128(&self) -> Option<u128> {
|
||||
pub fn to_u128(&self) -> Option<u128> {
|
||||
match *self {
|
||||
Self::Aes128(v) => Some(u128::from_be_bytes(v)),
|
||||
Self::Number(n) => Some(n),
|
||||
|
@ -93,7 +93,7 @@ impl InitializationVector {
|
|||
///
|
||||
/// [`MediaSegment`]: crate::MediaSegment
|
||||
#[must_use]
|
||||
pub const fn to_slice(&self) -> Option<[u8; 0x10]> {
|
||||
pub fn to_slice(&self) -> Option<[u8; 0x10]> {
|
||||
match &self {
|
||||
Self::Aes128(v) => Some(*v),
|
||||
Self::Number(v) => Some(v.to_be_bytes()),
|
||||
|
|
|
@ -144,7 +144,7 @@ impl KeyFormatVersions {
|
|||
/// the future this number might increase.
|
||||
#[inline]
|
||||
#[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.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue