@@ -1493,6 +1493,7 @@ impl Config {
1493
1493
ImportGranularityDef :: Item => ImportGranularity :: Item ,
1494
1494
ImportGranularityDef :: Crate => ImportGranularity :: Crate ,
1495
1495
ImportGranularityDef :: Module => ImportGranularity :: Module ,
1496
+ ImportGranularityDef :: One => ImportGranularity :: One ,
1496
1497
} ,
1497
1498
enforce_granularity : self . data . imports_granularity_enforce ,
1498
1499
prefix_kind : match self . data . imports_prefix {
@@ -1933,6 +1934,7 @@ enum ImportGranularityDef {
1933
1934
Item ,
1934
1935
Crate ,
1935
1936
Module ,
1937
+ One ,
1936
1938
}
1937
1939
1938
1940
#[ derive( Deserialize , Debug , Copy , Clone ) ]
@@ -2274,12 +2276,13 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
2274
2276
} ,
2275
2277
"ImportGranularityDef" => set ! {
2276
2278
"type" : "string" ,
2277
- "enum" : [ "preserve" , "crate" , "module" , "item" ] ,
2279
+ "enum" : [ "preserve" , "crate" , "module" , "item" , "one" ] ,
2278
2280
"enumDescriptions" : [
2279
2281
"Do not change the granularity of any imports and preserve the original structure written by the developer." ,
2280
2282
"Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements." ,
2281
2283
"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."
2283
2286
] ,
2284
2287
} ,
2285
2288
"ImportPrefixDef" => set ! {
0 commit comments