fn exceeded_timeout(s: &Instant, max: &Duration) -> Result<(), WaitError> {
    if s.elapsed() > *max {
        error!("timeout exceeded while shutting down");
        return Err(WaitError::Timeout(*max));
    }
    Ok(())
}
// checks if the time elapsed since the instant was created exceeds a defined duration
// ? Is this the correct way to name this method?
// ? Alternatives:
// ?   * has_exceeded_timeout
// ?   * error_if_timeout_exceeded
// ? The only reason this makes sense is because of the question mark operator.
// ? It looks like it's asking a question, so reads nicely.
checks if the time elapsed since the instant was created exceeds a defined duration
? Is this the correct way to name this method.
? Alternatives:
?   * has_exceeded_timeout
?   * error_if_timeout_exceeded
? The only reason this makes sense is because of the question mark operator.
? It looks like it's asking a question, so reads nicely.
checks if the time elapsed since the instant was created exceeds a defined duration ? Is this the correct way to name this method . ? Alternatives : ? * has_exceeded_timeout ? * error_if_timeout_exceeded ? The only reason this makes sense is because of the question mark operator . ? It looks like it ' s asking a question so reads nicely .
fn exceeded_timeout(s: &Instant, max: &Duration) -> Result<(), WaitError> {
    if s.elapsed() > *max {
        error!("timeout exceeded while shutting down");
        return Err(WaitError::Timeout(*max));
    }
    Ok(())
}
fn exceeded_timeout ( s : & Instant , max : & Duration ) -> Result < ( ) , WaitError > { if s . elapsed ( ) > * max { error ! ( " " ) ; return Err ( WaitError :: Timeout ( * max ) ) ; } Ok ( ( ) ) }
checks if the time elapsed since the instant was created exceeds a defined duration
?
checks if the time elapsed since the instant was created exceeds a defined duration ?
s
&Instant
max
&Duration
s
&Instant
max
&Duration