From 561f893d2a5fc01420dd6affa23f6d835b52044a Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Sat, 7 Aug 2021 16:05:58 +0700 Subject: [PATCH] Rust fmt --- src/talk/cmdline.rs | 7 ++++++- src/talk/mod.rs | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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!(), };