monoclient: fix clippy issues

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2024-07-13 22:20:57 +03:00
parent 7e8f797533
commit eaa7262d37
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C

View file

@ -5,7 +5,6 @@ use crossterm::style::Print;
use crossterm::terminal::{Clear, ClearType};
use lonelyradio_types::{Encoder, Settings};
use std::io::stdout;
use std::path::PathBuf;
use std::sync::OnceLock;
use std::time::Instant;
@ -16,9 +15,6 @@ struct Args {
/// Remote address
address: String,
#[arg(long)]
xor_key_file: Option<PathBuf>,
#[arg(short, long)]
verbose: bool,
}
@ -44,7 +40,6 @@ fn main() {
std::thread::spawn(move || {
monolib::run(
&args.address,
args.xor_key_file.map(|key| std::fs::read(key).expect("Failed to read preshared key")),
Settings {
encoder: Encoder::PcmFloat,
cover: -1,
@ -68,7 +63,6 @@ fn main() {
))
)
.unwrap();
let mut track_length = md.track_length_secs as f64 + md.track_length_frac as f64;
let mut next_md = md.clone();
crossterm::terminal::enable_raw_mode().unwrap();
loop {
@ -138,7 +132,6 @@ fn main() {
);
track_start = Instant::now();
seconds_past = 0;
track_length = md.track_length_secs as f64 + md.track_length_frac as f64
} else if next_md == md {
next_md = monolib::get_metadata().unwrap();
}