mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Optimize parse_header_retry_after
Use next_back instead of last Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
f3c04c8fed
commit
514151163b
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ fn parse_header_retry_after(headers: &HeaderMap) -> Option<Duration> {
|
|||
let header = headers
|
||||
.get_all(RETRY_AFTER)
|
||||
.into_iter()
|
||||
.last()?
|
||||
.next_back()?
|
||||
.to_str()
|
||||
.ok()?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue