Driver, Gateway: Remove tokio 0.2 support (#118)

* Remove tokio 0.2 compat
* Remove tokio 0.2 test
* Remove tokio 0.2 CI
This commit is contained in:
Gnome!
2022-03-31 17:41:53 +01:00
committed by Kyle Simpson
parent fac6664072
commit f2cd8a0b6a
21 changed files with 1 additions and 175 deletions

View File

@@ -4,10 +4,7 @@ use std::{
mem,
process::Child,
};
#[cfg(not(feature = "tokio-02-marker"))]
use tokio::runtime::Handle;
#[cfg(feature = "tokio-02-marker")]
use tokio_compat::runtime::Handle;
use tracing::debug;
/// Handle for a child process which ensures that any subprocesses are properly closed

View File

@@ -1,10 +1,7 @@
use super::{codec::OpusDecoderState, error::DcaError, Codec, Container, Input, Metadata, Reader};
use serde::Deserialize;
use std::{ffi::OsStr, mem};
#[cfg(not(feature = "tokio-02-marker"))]
use tokio::{fs::File as TokioFile, io::AsyncReadExt};
#[cfg(feature = "tokio-02-marker")]
use tokio_compat::{fs::File as TokioFile, io::AsyncReadExt};
/// Creates a streamed audio source from a DCA file.
/// Currently only accepts the [DCA1 format](https://github.com/bwmarrin/dca).

View File

@@ -11,10 +11,7 @@ use std::{
ffi::OsStr,
process::{Command, Stdio},
};
#[cfg(not(feature = "tokio-02-marker"))]
use tokio::process::Command as TokioCommand;
#[cfg(feature = "tokio-02-marker")]
use tokio_compat::process::Command as TokioCommand;
use tracing::debug;
/// Opens an audio file through `ffmpeg` and creates an audio source.

View File

@@ -58,10 +58,7 @@ use audiopus::coder::GenericCtl;
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use cached::OpusCompressor;
use error::{Error, Result};
#[cfg(not(feature = "tokio-02-marker"))]
use tokio::runtime::Handle;
#[cfg(feature = "tokio-02-marker")]
use tokio_compat::runtime::Handle;
use std::{
convert::TryFrom,

View File

@@ -11,10 +11,7 @@ use std::{
io::{BufRead, BufReader, Read},
process::{Command, Stdio},
};
#[cfg(not(feature = "tokio-02-marker"))]
use tokio::{process::Command as TokioCommand, task};
#[cfg(feature = "tokio-02-marker")]
use tokio_compat::{process::Command as TokioCommand, task};
use tracing::trace;
const YOUTUBE_DL_COMMAND: &str = if cfg!(feature = "youtube-dlc") {