From c9dadc8e42062c871a84fb0679830fb62aa41a4c Mon Sep 17 00:00:00 2001 From: james7132 Date: Fri, 9 Apr 2021 20:40:48 -0700 Subject: [PATCH] Require MediaSource to be Send --- symphonia-core/src/io/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/symphonia-core/src/io/mod.rs b/symphonia-core/src/io/mod.rs index b3de73dd..55c18379 100644 --- a/symphonia-core/src/io/mod.rs +++ b/symphonia-core/src/io/mod.rs @@ -25,7 +25,7 @@ pub use scoped_stream::ScopedStream; /// A `MediaSource` is a composite trait of `std::io::Read` and `std::io::Seek`. Despite requiring /// the `Seek` trait, seeking is an optional capability that can be queried at runtime. -pub trait MediaSource: io::Read + io::Seek { +pub trait MediaSource: io::Read + io::Seek + Send { /// Returns if the source is seekable. This may be an expensive operation. fn is_seekable(&self) -> bool; @@ -60,7 +60,7 @@ impl MediaSource for std::fs::File { } } -impl> MediaSource for io::Cursor { +impl + Send> MediaSource for io::Cursor { /// Always returns true since a `io::Cursor` is always seekable. fn is_seekable(&self) -> bool { true @@ -104,7 +104,7 @@ impl ReadOnlySource { } } -impl MediaSource for ReadOnlySource { +impl MediaSource for ReadOnlySource { fn is_seekable(&self) -> bool { false } @@ -352,4 +352,4 @@ pub trait FiniteStream { /// Returns the number of bytes available for reading. fn bytes_available(&self) -> u64; -} \ No newline at end of file +}