aboutsummaryrefslogtreecommitdiff
path: root/stream/types
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-03-07 23:28:45 +0100
committermetamuffin <metamuffin@disroot.org>2026-03-07 23:28:45 +0100
commit9d1e1772c02032f70b6db584dddae8fd06b490d6 (patch)
tree9d97b4d3e1252c4b99f30a19f339700eaab44c45 /stream/types
parentd1b7691adb7c40bf21053d324fdac16c544cd536 (diff)
downloadjellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar
jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.bz2
jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.zst
manual clippy
Diffstat (limited to 'stream/types')
-rw-r--r--stream/types/src/path.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/types/src/path.rs b/stream/types/src/path.rs
index 4a91457..226d6e8 100644
--- a/stream/types/src/path.rs
+++ b/stream/types/src/path.rs
@@ -9,9 +9,9 @@ use crate::{FormatNum, IndexNum, StreamContainer, StreamSpec, TrackKind, TrackNu
impl StreamSpec {
pub fn to_path(&self) -> String {
match self {
- StreamSpec::HlsMultiVariant => format!("stream.m3u8"),
- StreamSpec::Dash => format!("stream.mpd"),
- StreamSpec::Info => format!("formats.json"),
+ StreamSpec::HlsMultiVariant => "stream.m3u8".to_string(),
+ StreamSpec::Dash => "stream.mpd".to_string(),
+ StreamSpec::Info => "formats.json".to_string(),
StreamSpec::HlsVariant { track, format } => format!("{track}/{format}/variant.m3u8"),
StreamSpec::FragmentIndex { track } => format!("{track}/fragindex.json"),
StreamSpec::FragmentInit {
@@ -35,7 +35,7 @@ impl StreamSpec {
}
}
pub fn from_path(segments: &[&str]) -> Result<Self, &'static str> {
- let mut segs = segments.into_iter();
+ let mut segs = segments.iter();
match *segs.next().ok_or("no path")? {
"stream.mpd" => Ok(Self::Dash),
"stream.m3u8" => Ok(Self::HlsMultiVariant),