diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2023-02-25 19:08:29 -0500 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2023-02-25 19:28:50 -0500 |
| commit | 0413fb35babdfe8fe2456e7b3d520f1ffb5de231 (patch) | |
| tree | 9938720b708db9e681ba8c47a2f93ab99bba4286 /clippy_lints/src/inconsistent_struct_constructor.rs | |
| parent | e5df17aae5f9554ea8d241b4af91109400dc5cbd (diff) | |
| download | rust-0413fb35babdfe8fe2456e7b3d520f1ffb5de231.tar.gz rust-0413fb35babdfe8fe2456e7b3d520f1ffb5de231.zip | |
Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyup
Diffstat (limited to 'clippy_lints/src/inconsistent_struct_constructor.rs')
| -rw-r--r-- | clippy_lints/src/inconsistent_struct_constructor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/inconsistent_struct_constructor.rs b/clippy_lints/src/inconsistent_struct_constructor.rs index e2f2d3d42e6..1ad886f2cf3 100644 --- a/clippy_lints/src/inconsistent_struct_constructor.rs +++ b/clippy_lints/src/inconsistent_struct_constructor.rs @@ -7,7 +7,7 @@ use rustc_hir::{self as hir, ExprKind}; use rustc_lint::{LateContext, LateLintPass}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::symbol::Symbol; -use std::fmt::Write as _; +use std::fmt::{self, Write as _}; declare_clippy_lint! { /// ### What it does @@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for InconsistentStructConstructor { let mut fields_snippet = String::new(); let (last_ident, idents) = ordered_fields.split_last().unwrap(); for ident in idents { - let _ = write!(fields_snippet, "{ident}, "); + let _: fmt::Result = write!(fields_snippet, "{ident}, "); } fields_snippet.push_str(&last_ident.to_string()); |
