solana/runtime
Alessandro Decina b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836)
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values

set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).

Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.

* BorrowAccount: refactor common accounts_update_delta code in helper method

* BorrowedAccount: add extend_from_slice()

This allows avoiding copies appending entries to account lookup tables.

* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
..
benches patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
src BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836) 2022-09-24 01:37:02 +01:00
store-tool Whickey/version v1.15 (#27739) 2022-09-13 09:06:15 -05:00
tests tests: Keypair::new().pubkey() -> pubkey::new_rand (#27705) 2022-09-10 13:56:45 -07:00
.gitignore
Cargo.toml chore: bump itertools from 0.10.3 to 0.10.5 (#27962) 2022-09-21 15:28:49 -06:00
build.rs