We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d832525 commit 18cd0c4Copy full SHA for 18cd0c4
src/imports.rs
@@ -318,15 +318,10 @@ impl UseTree {
318
attrs,
319
};
320
321
- let leading_modsep = if context.config.edition() == Edition::Edition2018 {
322
- if a.prefix.to_string().len() > 2 && a.prefix.to_string().starts_with("::") {
323
- true
324
- } else {
325
- false
326
- }
327
328
329
- };
+ let leading_modsep = context.config.edition() == Edition::Edition2018
+ && a.prefix.to_string().len() > 2
+ && a.prefix.to_string().starts_with("::");
+
330
for p in &a.prefix.segments {
331
if let Some(use_segment) = UseSegment::from_path_segment(context, p, leading_modsep) {
332
result.path.push(use_segment);
0 commit comments