Support simd_json (#105)

This PR adds support for the simd-json library whenever decoding or encoding JSON responses. This may be enabled independently of serenity and twilight support for SIMD acceleration.

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
This commit is contained in:
Victoria Casasampere Fernandez
2022-07-25 15:18:45 +02:00
committed by Kyle Simpson
parent 8cc7a22b0b
commit cb0a74f511
13 changed files with 60 additions and 17 deletions

View File

@@ -2,8 +2,12 @@
#[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::InterMessage;
#[cfg(feature = "simd-json")]
pub use simd_json::Error as JsonError;
#[cfg(feature = "gateway")]
use std::{error::Error, fmt};
#[cfg(feature = "twilight")]