rust: remove needless borrow (#6922)

This was discovered by running clippy.
This commit is contained in:
Élie ROUDNINSKI
2021-11-23 16:46:56 +00:00
committed by GitHub
parent 9e4ca857b6
commit a14f4052cf
2 changed files with 6 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ pub fn root_with_opts<'opts, 'buf, T>(
where
T: 'buf + Follow<'buf> + Verifiable,
{
let mut v = Verifier::new(&opts, data);
let mut v = Verifier::new(opts, data);
<ForwardsUOffset<T>>::run_verifier(&mut v, 0)?;
Ok(unsafe { root_unchecked::<T>(data) })
}
@@ -73,7 +73,7 @@ pub fn size_prefixed_root_with_opts<'opts, 'buf, T>(
where
T: 'buf + Follow<'buf> + Verifiable,
{
let mut v = Verifier::new(&opts, data);
let mut v = Verifier::new(opts, data);
<SkipSizePrefix<ForwardsUOffset<T>>>::run_verifier(&mut v, 0)?;
Ok(unsafe { size_prefixed_root_unchecked::<T>(data) })
}