diff --git a/src/configuration.rs b/src/configuration.rs index 852bcc2..4087599 100644 --- a/src/configuration.rs +++ b/src/configuration.rs @@ -1,6 +1,5 @@ use clap::{Parser, Subcommand}; use lazy_static::lazy_static; -use std::env; use std::net::SocketAddr; use std::path::PathBuf; use std::str::FromStr; diff --git a/src/grpc.rs b/src/grpc.rs index 495e524..13eed50 100644 --- a/src/grpc.rs +++ b/src/grpc.rs @@ -1,7 +1,5 @@ -use std::error::Error; use std::net::{SocketAddr, TcpListener}; -use tonic::async_trait; pub use self::client::GRPCClient; pub use self::server::GRPCServer; diff --git a/src/player.rs b/src/player.rs index 557a660..7d8ae75 100644 --- a/src/player.rs +++ b/src/player.rs @@ -9,6 +9,7 @@ use rodio::{OutputStream, Sink}; use crate::configuration::{self, CONFIG}; use crate::file_explorer::walk_dir; +#[allow(dead_code)] pub struct Player { queue: VecDeque, sink: Sink, @@ -26,6 +27,7 @@ impl std::ops::Deref for Player { impl Player { pub fn new() -> Result> { let queue = walk_dir(None)?; + // stream needs to exist as long as sink to work let (stream, stream_handle) = OutputStream::try_default()?; let sink = Sink::try_new(&stream_handle)?; sink.set_volume(CONFIG.volume);