From 2cc35d173315aefc7be4ba3171a7687f97491405 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Sat, 30 Apr 2022 16:16:08 -0700 Subject: [PATCH] shrink Presentation by a word --- src/client/mod.rs | 4 ++-- src/client/parse.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index bac8b4d..7353fc8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -636,7 +636,7 @@ impl PlayOptions { #[derive(Debug)] pub(crate) struct Presentation { - pub streams: Vec, + pub streams: Box<[Stream]>, base_url: Url, pub control: Url, tool: Option, @@ -1842,7 +1842,7 @@ impl Session { .conn .as_ref() .ok_or_else(|| wrap!(ErrorInt::FailedPrecondition("no connection".into())))?; - for s in &mut inner.presentation.streams { + for s in &mut *inner.presentation.streams { if matches!(s.state, StreamState::Playing { .. }) { if let Err(ref description) = s.depacketizer { bail!(ErrorInt::RtspResponseError { diff --git a/src/client/parse.rs b/src/client/parse.rs index 87af2d0..56af658 100644 --- a/src/client/parse.rs +++ b/src/client/parse.rs @@ -464,7 +464,7 @@ pub(crate) fn parse_describe( ) }) }) - .collect::, String>>()?; + .collect::>()?; Ok(Presentation { streams,