From 1686e7267ef33af75878b7047881c5db516dd55c Mon Sep 17 00:00:00 2001 From: Gnome! Date: Mon, 9 Sep 2024 19:15:01 +0100 Subject: [PATCH] Remove unnecessary simd-json feature gate (#252) * Remove unneccessary simd-json feature gate * Fix redundant closure warning --- src/error.rs | 1 - src/input/sources/ytdl.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index a95897b97..60ffe122f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,7 +2,6 @@ #[cfg(feature = "serenity")] use futures::channel::mpsc::TrySendError; -#[cfg(not(feature = "simd-json"))] pub use serde_json::Error as JsonError; #[cfg(feature = "serenity")] use serenity::gateway::ShardRunnerMessage; diff --git a/src/input/sources/ytdl.rs b/src/input/sources/ytdl.rs index 8f98115e9..f81f8fc27 100644 --- a/src/input/sources/ytdl.rs +++ b/src/input/sources/ytdl.rs @@ -168,7 +168,7 @@ impl<'a> YoutubeDl<'a> { .stdout .split(|&b| b == b'\n') .filter(|&x| (!x.is_empty())) - .map(|x| serde_json::from_slice(x)) + .map(serde_json::from_slice) .collect::, _>>() .map_err(|e| AudioStreamError::Fail(Box::new(e)))?;