mirror of
https://github.com/alemidev/scope-tui.git
synced 2024-11-23 14:14:48 +01:00
fix: cargo warns
This commit is contained in:
parent
58a084e154
commit
c81d55b48b
2 changed files with 4 additions and 5 deletions
|
@ -5,7 +5,6 @@ edition = "2021"
|
||||||
authors = [ "alemi <me@alemi.dev>" ]
|
authors = [ "alemi <me@alemi.dev>" ]
|
||||||
description = "A simple oscilloscope/vectorscope/spectroscope for your terminal"
|
description = "A simple oscilloscope/vectorscope/spectroscope for your terminal"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
license-file = "LICENSE"
|
|
||||||
keywords = ["cli", "tui", "audio", "visualization", "scope"]
|
keywords = ["cli", "tui", "audio", "visualization", "scope"]
|
||||||
repository = "https://git.alemi.dev/scope-tui.git"
|
repository = "https://git.alemi.dev/scope-tui.git"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -6,8 +6,8 @@ pub struct FileSource {
|
||||||
file: File,
|
file: File,
|
||||||
buffer: Vec<u8>,
|
buffer: Vec<u8>,
|
||||||
channels: usize,
|
channels: usize,
|
||||||
sample_rate: usize,
|
_sample_rate: usize,
|
||||||
limit_rate: bool,
|
_limit_rate: bool,
|
||||||
// TODO when all data is available (eg, file) limit data flow to make it
|
// TODO when all data is available (eg, file) limit data flow to make it
|
||||||
// somehow visualizable. must be optional because named pipes block
|
// somehow visualizable. must be optional because named pipes block
|
||||||
// TODO support more formats
|
// TODO support more formats
|
||||||
|
@ -19,8 +19,8 @@ impl FileSource {
|
||||||
Ok(Box::new(
|
Ok(Box::new(
|
||||||
FileSource {
|
FileSource {
|
||||||
channels: opts.channels,
|
channels: opts.channels,
|
||||||
sample_rate: opts.sample_rate as usize,
|
_sample_rate: opts.sample_rate as usize,
|
||||||
limit_rate,
|
_limit_rate: limit_rate,
|
||||||
file: File::open(path)?,
|
file: File::open(path)?,
|
||||||
buffer: vec![0u8; opts.buffer as usize * opts.channels],
|
buffer: vec![0u8; opts.buffer as usize * opts.channels],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue