@@ -1493,6 +1493,7 @@ impl Config {
14931493 ImportGranularityDef :: Item => ImportGranularity :: Item ,
14941494 ImportGranularityDef :: Crate => ImportGranularity :: Crate ,
14951495 ImportGranularityDef :: Module => ImportGranularity :: Module ,
1496+ ImportGranularityDef :: One => ImportGranularity :: One ,
14961497 } ,
14971498 enforce_granularity : self . data . imports_granularity_enforce ,
14981499 prefix_kind : match self . data . imports_prefix {
@@ -1933,6 +1934,7 @@ enum ImportGranularityDef {
19331934 Item ,
19341935 Crate ,
19351936 Module ,
1937+ One ,
19361938}
19371939
19381940#[ derive( Deserialize , Debug , Copy , Clone ) ]
@@ -2274,12 +2276,13 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
22742276 } ,
22752277 "ImportGranularityDef" => set ! {
22762278 "type" : "string" ,
2277- "enum" : [ "preserve" , "crate" , "module" , "item" ] ,
2279+ "enum" : [ "preserve" , "crate" , "module" , "item" , "one" ] ,
22782280 "enumDescriptions" : [
22792281 "Do not change the granularity of any imports and preserve the original structure written by the developer." ,
22802282 "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements." ,
22812283 "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements." ,
2282- "Flatten imports so that each has its own use statement."
2284+ "Flatten imports so that each has its own use statement." ,
2285+ "Merge all imports into a single use statement as long as they have the same visibility and attributes."
22832286 ] ,
22842287 } ,
22852288 "ImportPrefixDef" => set ! {
0 commit comments