From 92314a1c9fb43f5cd5468a267f736844b1acd561 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 f289d5d70..344c54b12 100644 --- a/src/input/sources/ytdl.rs +++ b/src/input/sources/ytdl.rs @@ -157,7 +157,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)))?;