diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-27 15:06:56 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-06-20 13:21:07 +1000 | 
| commit | b95d39d37ae99bca1e9938738ec2c0e3724eefb1 (patch) | |
| tree | 9c244265f158573d7e1c0f95ac214a84188cb9e2 | |
| parent | 1edf2019370356b81ac60d43899bf7b828771470 (diff) | |
| download | rust-b95d39d37ae99bca1e9938738ec2c0e3724eefb1.tar.gz rust-b95d39d37ae99bca1e9938738ec2c0e3724eefb1.zip | |
Remove an unnecessary check in rustfmt.
"{{root}}" is an internal-only name, and cannot appear in Rust code
being formatted.
| -rw-r--r-- | src/tools/rustfmt/src/imports.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/tools/rustfmt/src/imports.rs b/src/tools/rustfmt/src/imports.rs index b741dd9b5da..788fed013ad 100644 --- a/src/tools/rustfmt/src/imports.rs +++ b/src/tools/rustfmt/src/imports.rs @@ -184,7 +184,7 @@ impl UseSegment { modsep: bool, ) -> Option<UseSegment> { let name = rewrite_ident(context, path_seg.ident); - if name.is_empty() || name == "{{root}}" { + if name.is_empty() { return None; } let kind = match name { | 
