Skip to content

Commit

Permalink
Update clippy_utils/src/higher.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Cameron Steffen <cam.steffen94@gmail.com>
  • Loading branch information
smoelius and camsteffen authored Oct 4, 2021
1 parent 5663df0 commit 83809b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_utils/src/higher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ impl<'tcx> Iterator for FormatArgsIter<'tcx> {
if let ExprKind::Struct(_, [position_field, _], _) = fmt.kind;
let _ = assert_eq!(position_field.ident.name, sym::position);
if let ExprKind::Lit(lit) = &position_field.expr.kind;
if let LitKind::Int(u128, _) = lit.node;
if let LitKind::Int(position, _) = lit.node;
then {
let i = usize::try_from(u128).unwrap();
FormatArgsArg { value: value_args[i], arg: &args[i], fmt: Some(fmt) }
Expand Down

0 comments on commit 83809b4

Please sign in to comment.