diff options
| author | Donough Liu <liudingming@bytdance.com> | 2022-08-29 19:06:36 +0100 |
|---|---|---|
| committer | bogon-right <bogon-right@bytedance.com> | 2022-08-30 04:42:03 +0100 |
| commit | 97b1a6146c630374ddab15f424eb8141dbb88960 (patch) | |
| tree | 44b36c68cb488cf66023a8c5eda9fa788d117b38 /compiler/rustc_macros/src | |
| parent | b96fa1a25ced4cfa72923e6d45f47f36c2c00ce0 (diff) | |
Use more `into_iter` rather than `drain(..)`
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs index a4ccfcace19..2a4fe48a8ac 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs @@ -239,7 +239,7 @@ impl DiagnosticDeriveBuilder { } } - Ok(tokens.drain(..).collect()) + Ok(tokens.into_iter().collect()) } fn generate_field_attrs_code(&mut self, binding_info: &BindingInfo<'_>) -> TokenStream { |
