chore: cleanup cargo warnings
This commit is contained in:
parent
2292035b8d
commit
9cec453498
3 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use std::env;
|
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
use std::error::Error;
|
|
||||||
use std::net::{SocketAddr, TcpListener};
|
use std::net::{SocketAddr, TcpListener};
|
||||||
|
|
||||||
use tonic::async_trait;
|
|
||||||
|
|
||||||
pub use self::client::GRPCClient;
|
pub use self::client::GRPCClient;
|
||||||
pub use self::server::GRPCServer;
|
pub use self::server::GRPCServer;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ use rodio::{OutputStream, Sink};
|
||||||
use crate::configuration::{self, CONFIG};
|
use crate::configuration::{self, CONFIG};
|
||||||
use crate::file_explorer::walk_dir;
|
use crate::file_explorer::walk_dir;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct Player {
|
pub struct Player {
|
||||||
queue: VecDeque<PathBuf>,
|
queue: VecDeque<PathBuf>,
|
||||||
sink: Sink,
|
sink: Sink,
|
||||||
|
|
@ -26,6 +27,7 @@ impl std::ops::Deref for Player {
|
||||||
impl Player {
|
impl Player {
|
||||||
pub fn new() -> Result<Self, Box<dyn Error>> {
|
pub fn new() -> Result<Self, Box<dyn Error>> {
|
||||||
let queue = walk_dir(None)?;
|
let queue = walk_dir(None)?;
|
||||||
|
// stream needs to exist as long as sink to work
|
||||||
let (stream, stream_handle) = OutputStream::try_default()?;
|
let (stream, stream_handle) = OutputStream::try_default()?;
|
||||||
let sink = Sink::try_new(&stream_handle)?;
|
let sink = Sink::try_new(&stream_handle)?;
|
||||||
sink.set_volume(CONFIG.volume);
|
sink.set_volume(CONFIG.volume);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue