fix(cli): use Duration::from_mins for token wait timeout
Satisfies clippy::duration_suboptimal_units by expressing the 2-minute browser-auth timeout with from_mins(2) instead of from_secs(120).
This commit is contained in:
parent
2312315f34
commit
c108a39f2c
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ pub async fn create_token(client: &BrewlogClient, cmd: CreateTokenCommand) -> Re
|
||||||
result = rx => {
|
result = rx => {
|
||||||
result.context("callback server closed without receiving a token")?
|
result.context("callback server closed without receiving a token")?
|
||||||
}
|
}
|
||||||
() = tokio::time::sleep(std::time::Duration::from_secs(120)) => {
|
() = tokio::time::sleep(std::time::Duration::from_mins(2)) => {
|
||||||
return Err(anyhow!("timed out waiting for browser authentication (2 minutes)"));
|
return Err(anyhow!("timed out waiting for browser authentication (2 minutes)"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue