Add AsRef<AccountInfo> for AccountInfo

This commit is contained in:
Kirill Fomichev 2021-08-15 00:07:39 +03:00 committed by Michael Vines
parent a0e8b860b1
commit 930465e67c
1 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,12 @@ pub fn next_account_infos<'a, 'b: 'a>(
Ok(accounts)
}
impl<'a> AsRef<AccountInfo<'a>> for AccountInfo<'a> {
fn as_ref(&self) -> &AccountInfo<'a> {
self
}
}
#[cfg(test)]
mod tests {
use super::*;