Fix warnings (#10992)

* Fix warnings

* disable warning
This commit is contained in:
Jack May 2020-07-10 13:02:55 -07:00 committed by GitHub
parent 25ca99cdcf
commit 57576b07ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -393,6 +393,7 @@ mod tests {
);
// Case: Write bytes to an offset
#[allow(unused_mut)]
let mut keyed_accounts = vec![KeyedAccount::new(&program_key, true, &program_account)];
keyed_accounts[0].account.borrow_mut().data = vec![0; 6];
assert_eq!(
@ -410,6 +411,7 @@ mod tests {
);
// Case: Overflow
#[allow(unused_mut)]
let mut keyed_accounts = vec![KeyedAccount::new(&program_key, true, &program_account)];
keyed_accounts[0].account.borrow_mut().data = vec![0; 5];
assert_eq!(

View File

@ -1354,6 +1354,7 @@ mod tests {
let not_owned_account = Account::new(84, 1, &Pubkey::new_rand());
let not_owned_preaccount = PreAccount::new(&not_owned_key, &not_owned_account, false, true);
#[allow(unused_mut)]
let mut accounts = vec![
Rc::new(RefCell::new(owned_account)),
Rc::new(RefCell::new(not_owned_account)),