Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should RateLimit::reset be a u64? #614

Closed
smoelius opened this issue Mar 23, 2024 · 1 comment · Fixed by #615
Closed

Should RateLimit::reset be a u64? #614

smoelius opened this issue Mar 23, 2024 · 1 comment · Fixed by #615

Comments

@smoelius
Copy link
Contributor

Re this line:

pub reset: usize,

The GitHub REST API docs describe the corresponding header (x-ratelimit-reset) as "UTC epoch seconds".

This suggests that users should pass the value to Duration::from_secs.

Since Duration::from_secs expects a u64, should this field be a u64?

@XAMPPRocky
Copy link
Owner

Thank you for your issue! Yeah I think that's a reasonable change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants