Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosprint committed May 28, 2024
1 parent d9a6d0f commit 59a399f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ fn draw_rec_waveform(
selected_output: &str,
) -> Result<()> {
terminal.draw(|f| {
let waveform_data = shared_waveform_data;
let waveform: Vec<f32> = waveform_data.iter().copied().collect();
let waveform: Vec<f32> = shared_waveform_data.to_vec();

let vertical = Layout::default()
.direction(Direction::Vertical)
Expand Down
2 changes: 1 addition & 1 deletion src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pub fn record_audio(output: String, device: &str, _jack: bool) -> anyhow::Result
cpal::SampleFormat::F32 => device.build_input_stream(
&config.into(),
move |data: &[f32], _: &_| {
let float_data: Vec<f32> = data.iter().cloned().collect();
let float_data: Vec<f32> = data.to_vec();
ui_tx.send(float_data.clone()).ok();
writer_tx.send(float_data).ok();
},
Expand Down

0 comments on commit 59a399f

Please sign in to comment.