diff --git a/src/talk/cmdline.rs b/src/talk/cmdline.rs index 773c29f..bd16704 100644 --- a/src/talk/cmdline.rs +++ b/src/talk/cmdline.rs @@ -22,7 +22,12 @@ pub struct Opt { #[structopt(short, long, conflicts_with = "file_path")] pub microphone: bool, /// Use a specific microphone like "alsasrc device=hw:1" - #[structopt(short, long, default_value = "autoaudiosrc", conflicts_with = "file_path",)] + #[structopt( + short, + long, + default_value = "autoaudiosrc", + conflicts_with = "file_path" + )] pub input_src: String, /// Use to change the volume of the input #[structopt(short, long, default_value = "1.0")] diff --git a/src/talk/mod.rs b/src/talk/mod.rs index 94a4c08..c99461b 100644 --- a/src/talk/mod.rs +++ b/src/talk/mod.rs @@ -80,12 +80,17 @@ pub fn main(opt: Opt) -> Result<(), Error> { let rx = match (&opt.file_path, &opt.microphone) { (Some(path), false) => gst::from_input( - &format!("filesrc location={}", path.to_str().expect("File path not UTF8 complient")), + &format!( + "filesrc location={}", + path.to_str().expect("File path not UTF8 complient") + ), opt.volume, block_size, sample_rate, )?, - (None, true) => gst::from_input(&opt.input_src, opt.volume, block_size, sample_rate)?, + (None, true) => { + gst::from_input(&opt.input_src, opt.volume, block_size, sample_rate)? + } _ => unreachable!(), };