Remove unnecessary simd-json feature gate (#252)

* Remove unneccessary simd-json feature gate

* Fix redundant closure warning
This commit is contained in:
Gnome!
2024-09-09 19:15:01 +01:00
committed by Kyle Simpson
parent 9a244ba4c2
commit b435e167d2
2 changed files with 1 additions and 2 deletions

View File

@@ -2,7 +2,6 @@
#[cfg(feature = "serenity")] #[cfg(feature = "serenity")]
use futures::channel::mpsc::TrySendError; use futures::channel::mpsc::TrySendError;
#[cfg(not(feature = "simd-json"))]
pub use serde_json::Error as JsonError; pub use serde_json::Error as JsonError;
#[cfg(feature = "serenity")] #[cfg(feature = "serenity")]
use serenity::gateway::ShardRunnerMessage; use serenity::gateway::ShardRunnerMessage;

View File

@@ -168,7 +168,7 @@ impl<'a> YoutubeDl<'a> {
.stdout .stdout
.split(|&b| b == b'\n') .split(|&b| b == b'\n')
.filter(|&x| (!x.is_empty())) .filter(|&x| (!x.is_empty()))
.map(|x| serde_json::from_slice(x)) .map(serde_json::from_slice)
.collect::<Result<Vec<Output>, _>>() .collect::<Result<Vec<Output>, _>>()
.map_err(|e| AudioStreamError::Fail(Box::new(e)))?; .map_err(|e| AudioStreamError::Fail(Box::new(e)))?;