diff --git a/check_diff/src/lib.rs b/check_diff/src/lib.rs index 072b2f5d5c1..d05ff874205 100644 --- a/check_diff/src/lib.rs +++ b/check_diff/src/lib.rs @@ -227,6 +227,35 @@ pub fn build_rustfmt_from_src(binary_path: PathBuf) -> Result>) { + let config_arg: String = match config { + Some(configs) => { + let mut result = String::new(); + result.push(','); + for arg in configs.iter() { + result.push_str(arg.as_str()); + result.push(','); + } + result.pop(); + result + } + None => String::new(), + }; + let config = format!( + "error_on_line_overflow=false,error_on_unformatted=false{}", + config_arg.as_str() + ); +} + // Compiles and produces two rustfmt binaries. // One for the current master, and another for the feature branch // Parameters: