don't convert types to the same type with try_into (clippy::useless_conversion)
This commit is contained in:
parent
a874956d94
commit
f567287f9f
3 changed files with 4 additions and 9 deletions
|
@ -33,7 +33,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
let tcx = self.hir.tcx();
|
||||
let (min_length, exact_size) = match place.ty(&self.local_decls, tcx).ty.kind() {
|
||||
ty::Array(_, length) => {
|
||||
(length.eval_usize(tcx, self.hir.param_env).try_into().unwrap(), true)
|
||||
(length.eval_usize(tcx, self.hir.param_env), true)
|
||||
}
|
||||
_ => ((prefix.len() + suffix.len()).try_into().unwrap(), false),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue