fn validate_sender_delegation_expiry(
    sender_delegation: &Option<Vec<SignedDelegation>>,
    current_time: Time,
) -> Result<(), RequestValidationError> {
    if let Some(delegations) = &sender_delegation {
        for delegation in delegations.iter() {
            let expiry = delegation.delegation().expiration();
            if delegation.delegation().expiration() < current_time {
                return Err(InvalidDelegationExpiry(format!(
                    "Specified sender delegation has expired:\n\
                     Provided expiry:    {}\n\
                     Local replica time: {}",
                    expiry, current_time,
                )));
            }
        }
    }
    Ok(())
}
// Check if any of the sender delegation has expired with respect to the
// `current_time`, and return an error if so.
Check if any of the sender delegation has expired with respect to the
`current_time`, and return an error if so.
Check if any of the sender delegation has expired with respect to the ` current_time ` and return an error if so .
fn validate_sender_delegation_expiry(
    sender_delegation: &Option<Vec<SignedDelegation>>,
    current_time: Time,
) -> Result<(), RequestValidationError> {
    if let Some(delegations) = &sender_delegation {
        for delegation in delegations.iter() {
            let expiry = delegation.delegation().expiration();
            if delegation.delegation().expiration() < current_time {
                return Err(InvalidDelegationExpiry(format!(
                    "Specified sender delegation has expired:\n\
                     Provided expiry:    {}\n\
                     Local replica time: {}",
                    expiry, current_time,
                )));
            }
        }
    }
    Ok(())
}
fn validate_sender_delegation_expiry ( sender_delegation : & Option < Vec < SignedDelegation > > , current_time : Time , ) -> Result < ( ) , RequestValidationError > { if let Some ( delegations ) = & sender_delegation { for delegation in delegations . iter ( ) { let expiry = delegation . delegation ( ) . expiration ( ) ; if delegation . delegation ( ) . expiration ( ) < current_time { return Err ( InvalidDelegationExpiry ( format ! ( " \n \
 \n \
 " expiry current_time ) ) ) ; } } } Ok ( ( ) ) }
Check if any of the sender delegation has expired with respect to the
`current_time`, and return an error if so.
Check if any of the sender delegation has expired with respect to the ` current_time ` and return an error if so .
sender_delegation
&Option<Vec<SignedDelegation>>
current_time
Time
sender_delegation
&Option<Vec<SignedDelegation>>
current_time
Time