Remove old .rustfmt.toml config. Run default cargo fmt on repo.
Seeing as a few large refactors have landed recently, I thought I'd take this opportunity to do a `cargo fmt` run and standardise on the default rustfmt settings.
This commit is contained in:
parent
95cda0dbe8
commit
aab0d90add
20 changed files with 458 additions and 530 deletions
|
|
@ -7,9 +7,9 @@ extern crate cpal;
|
|||
extern crate hound;
|
||||
|
||||
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::fs::File;
|
||||
use std::io::BufWriter;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
// Use the default host for working with audio devices.
|
||||
|
|
@ -40,12 +40,10 @@ fn main() -> Result<(), anyhow::Error> {
|
|||
eprintln!("an error occurred on stream: {}", err);
|
||||
};
|
||||
|
||||
let data_fn = move |data: &cpal::Data| {
|
||||
match data.sample_format() {
|
||||
cpal::SampleFormat::F32 => write_input_data::<f32, f32>(data, &writer_2),
|
||||
cpal::SampleFormat::I16 => write_input_data::<i16, i16>(data, &writer_2),
|
||||
cpal::SampleFormat::U16 => write_input_data::<u16, i16>(data, &writer_2),
|
||||
}
|
||||
let data_fn = move |data: &cpal::Data| match data.sample_format() {
|
||||
cpal::SampleFormat::F32 => write_input_data::<f32, f32>(data, &writer_2),
|
||||
cpal::SampleFormat::I16 => write_input_data::<i16, i16>(data, &writer_2),
|
||||
cpal::SampleFormat::U16 => write_input_data::<u16, i16>(data, &writer_2),
|
||||
};
|
||||
|
||||
let stream = device.build_input_stream(&format, data_fn, err_fn)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue