]> git.lizzy.rs Git - rust.git/blobdiff - src/bin/rustfmt.rs
add option to ignore out of line modules
[rust.git] / src / bin / rustfmt.rs
index 1b54d0d4d06ab4b237c8f63803aa7872f53eb46c..3e369e1ef234edbeddf5c58a112fa8cc378af0d3 100644 (file)
@@ -79,6 +79,7 @@ fn lookup_and_read_project_file(input_file: &Path) -> io::Result<(PathBuf, Strin
 
 fn update_config(config: &mut Config, matches: &Matches) {
     config.verbose = matches.opt_present("verbose");
+    config.skip_children = matches.opt_present("skip-children");
 }
 
 fn execute() -> i32 {
@@ -90,6 +91,7 @@ fn execute() -> i32 {
                 "write-mode",
                 "mode to write in (not usable when piping from stdin)",
                 "[replace|overwrite|display|diff|coverage]");
+    opts.optflag("", "skip-children", "don't reformat child modules");
 
     opts.optflag("",
                  "config-help",