mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
Merge pull request #966 from MicahChalmer/skip-children-in-plain-write-mode
Always skip children when using Plain write mode
This commit is contained in:
commit
5092eec081
@ -280,8 +280,11 @@ fn format_ast(krate: &ast::Crate,
|
||||
config: &Config)
|
||||
-> FileMap {
|
||||
let mut file_map = FileMap::new();
|
||||
// We always skip children for the "Plain" write mode, since there is
|
||||
// nothing to distinguish the nested module contents.
|
||||
let skip_children = config.skip_children || config.write_mode == config::WriteMode::Plain;
|
||||
for (path, module) in modules::list_files(krate, parse_session.codemap()) {
|
||||
if config.skip_children && path.as_path() != main_file {
|
||||
if skip_children && path.as_path() != main_file {
|
||||
continue;
|
||||
}
|
||||
let path = path.to_str().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user