1
0
Fork 0
mirror of https://github.com/alemidev/scope-tui.git synced 2024-11-14 02:39:20 +01:00

fix: cargo warns

This commit is contained in:
əlemi 2024-04-04 23:54:10 +02:00
parent 58a084e154
commit c81d55b48b
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 4 additions and 5 deletions

View file

@ -5,7 +5,6 @@ edition = "2021"
authors = [ "alemi <me@alemi.dev>" ]
description = "A simple oscilloscope/vectorscope/spectroscope for your terminal"
license = "MIT"
license-file = "LICENSE"
keywords = ["cli", "tui", "audio", "visualization", "scope"]
repository = "https://git.alemi.dev/scope-tui.git"
readme = "README.md"

View file

@ -6,8 +6,8 @@ pub struct FileSource {
file: File,
buffer: Vec<u8>,
channels: usize,
sample_rate: usize,
limit_rate: bool,
_sample_rate: usize,
_limit_rate: bool,
// TODO when all data is available (eg, file) limit data flow to make it
// somehow visualizable. must be optional because named pipes block
// TODO support more formats
@ -19,8 +19,8 @@ impl FileSource {
Ok(Box::new(
FileSource {
channels: opts.channels,
sample_rate: opts.sample_rate as usize,
limit_rate,
_sample_rate: opts.sample_rate as usize,
_limit_rate: limit_rate,
file: File::open(path)?,
buffer: vec![0u8; opts.buffer as usize * opts.channels],
}