pub fn is_dup(accounts: &[KeyedAccount], keyed_account: &KeyedAccount) -> (bool, usize) {
    for (i, account) in accounts.iter().enumerate() {
        if account == keyed_account {
            return (true, i);
        }
    }
    (false, 0)
}
/// Look for a duplicate account and return its position if found
Look for a duplicate account and return its position if found
Look for a duplicate account and return its position if found
pub fn is_dup(accounts: &[KeyedAccount], keyed_account: &KeyedAccount) -> (bool, usize) {
    for (i, account) in accounts.iter().enumerate() {
        if account == keyed_account {
            return (true, i);
        }
    }
    (false, 0)
}
pub fn is_dup ( accounts : & [ KeyedAccount ] , keyed_account : & KeyedAccount ) -> ( bool , usize ) { for ( i , account ) in accounts . iter ( ) . enumerate ( ) { if account == keyed_account { return ( true , i ) ; } } ( false , 0 ) }
Look for a duplicate account and return its position if found
Look for a duplicate account and return its position if found
accounts
&[KeyedAccount]
keyed_account
&KeyedAccount
accounts
&[KeyedAccount]
keyed_account
&KeyedAccount